Skip to content

Commit 02cdd0f

Browse files
authored
Merge pull request #241 from limanmys/feature-new-ui
Liman 2.0 Release
2 parents d4f65f4 + 385c43f commit 02cdd0f

File tree

709 files changed

+40152
-188100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

709 files changed

+40152
-188100
lines changed

.env.example

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ BRAND_NAME="HAVELSAN © 2023"
5454
# Extension request timeout parameter, Liman render engine using it
5555
EXTENSION_TIMEOUT=30
5656

57-
# WIZARD STEP
58-
# Don't change it if you don't know what you doing.
59-
# Values: 1 (Start), 4 (Finish)
60-
WIZARD_STEP=1
61-
6257
# BRANDING ON LOGIN SCREEN
6358
# You can set it from Liman system settings.
6459
# Values: <image url>
@@ -95,11 +90,11 @@ MAIL_MAILER=smtp
9590

9691
# MAIL HOST
9792
# Mail server
98-
MAIL_HOST=smtp.mailtrap.io
93+
MAIL_HOST=0.0.0.0
9994

10095
# MAIL PORT
10196
# Mail server port
102-
MAIL_PORT=2525
97+
MAIL_PORT=1025
10398

10499
# MAIL USERNAME
105100
# The user that exists on mail server

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
*.css linguist-vendored
33
*.scss linguist-vendored
44
*.js linguist-vendored
5+
*.blade.php linguist-vendored
6+
*.sh linguist-vendored
57
CHANGELOG.md export-ignore

.github/workflows/docker-publish.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Docker
2+
on: [push]
3+
4+
env:
5+
# Use docker.io for Docker Hub if empty
6+
REGISTRY: docker.io
7+
# github.repository as <account>/<repo>
8+
IMAGE_NAME: aciklab/liman
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
# This is used to complete the identity challenge
18+
# with sigstore/fulcio when running outside of PRs.
19+
id-token: write
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v3
24+
25+
- name: Get version details
26+
run: |
27+
VERSION=`cat storage/VERSION`
28+
echo "RELEASE_VER=$(echo $VERSION)" >> $GITHUB_ENV
29+
echo "RELEASE_RUNNUMBER=$(($GITHUB_RUN_NUMBER+874))" >> $GITHUB_ENV
30+
31+
# Set up BuildKit Docker container builder to be able to build
32+
# multi-platform images and export cache
33+
# https://github.com/docker/setup-buildx-action
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
36+
37+
# Login against a Docker registry except on PR
38+
# https://github.com/docker/login-action
39+
- name: Log into registry docker.io
40+
if: github.event_name != 'pull_request'
41+
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
42+
with:
43+
registry: ${{ env.REGISTRY }}
44+
username: ${{ secrets.DOCKER_USERNAME }}
45+
password: ${{ secrets.DOCKER_PASSWORD }}
46+
47+
# Extract metadata (tags, labels) for Docker
48+
# https://github.com/docker/metadata-action
49+
- name: Extract Docker metadata
50+
id: meta
51+
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
52+
with:
53+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
54+
55+
# Build and push Docker image with Buildx (don't push on PR)
56+
# https://github.com/docker/build-push-action
57+
- name: Build and push Docker image
58+
id: build-and-push
59+
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
60+
with:
61+
context: .
62+
push: ${{ github.event_name != 'pull_request' }}
63+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.RELEASE_VER }}-${{ env.RELEASE_RUNNUMBER }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
64+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/main.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Liman CI
22
on: [push]
33

44
jobs:
@@ -15,6 +15,17 @@ jobs:
1515
php-version: "8.1"
1616
tools: composer
1717
extensions: ssh2, curl, sqlite3, ldap, mbstring, xml, zip, posix, smbclient, gd
18+
19+
- name: Restore the Composer cache directory
20+
id: composercache
21+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
22+
23+
- uses: actions/cache@v3
24+
with:
25+
path: ${{ steps.composercache.outputs.dir }}
26+
key: ${{ runner.os }}-'8.1'-composer-${{ hashFiles('**/composer.json') }}
27+
restore-keys: ${{ runner.os }}-'8.1'-composer-
28+
1829
- name: Build Liman Package
1930
env:
2031
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
@@ -59,4 +70,4 @@ jobs:
5970
${{ env.RELEASE_RPMFILENAME }}
6071
name: "Release ${{ env.RELEASE_VER }} - ${{ env.RELEASE_RUNNUMBER }}"
6172
tag_name: "release.${{ env.LIMAN_BRANCH }}.${{ env.RELEASE_RUNNUMBER }}"
62-
prerelease: ${{ env.PRERELEASE }}
73+
prerelease: ${{ env.PRERELEASE }}

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

Dockerfile

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# LIMAN DOCKERFILE
2+
# AUTHOR: Doğukan Öksüz <dogukan@liman.dev>
3+
4+
FROM ubuntu:jammy
5+
EXPOSE 80 443
6+
7+
# DEPENDENCIES
8+
RUN echo LIMAN.HAVELSAN.COM.TR
9+
RUN export DEBIAN_FRONTEND=noninteractive;
10+
ARG DEBIAN_FRONTEND=noninteractive
11+
ENV DEBIAN_FRONTEND noninteractive
12+
ENV TZ=Europe/Istanbul
13+
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
14+
RUN apt -yqq update
15+
RUN DEBIAN_FRONTEND=noninteractive apt -yqq install software-properties-common gnupg2 ca-certificates wget curl
16+
RUN add-apt-repository --yes ppa:ondrej/php
17+
RUN mkdir -p /etc/apt/keyrings
18+
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
19+
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
20+
RUN apt -yqq update
21+
22+
# LIMAN DEPS
23+
RUN DEBIAN_FRONTEND=noninteractive apt -yqq install sudo nodejs gpg zip unzip nginx sysstat php8.1-redis php8.1-fpm php8.1-gd php8.1-curl php8.1 php8.1-sqlite3 php8.1-snmp php8.1-mbstring php8.1-xml php8.1-zip php8.1-posix libnginx-mod-http-headers-more-filter libssl3 supervisor php8.1-pgsql pgloader php8.1-bcmath rsync dnsutils php8.1-ldap php8.1-smbclient krb5-user php8.1-ssh2 smbclient novnc
24+
25+
# FILES
26+
RUN bash -c 'mkdir -p /liman_files/{server,certs,logs,database,sandbox,keys,extensions,modules,packages,ui}'
27+
28+
# UI
29+
RUN curl -s https://api.github.com/repos/limanmys/next/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d \" | wget -qi -
30+
RUN unzip ui*.zip -d ui
31+
RUN mv ui /liman_files/
32+
33+
# CORE
34+
RUN wget "https://github.com/limanmys/core/archive/refs/heads/feature-new-ui.zip" -O "core.zip"
35+
RUN unzip -qq core.zip
36+
RUN mv core-feature-new-ui/* /liman_files/server
37+
RUN mv core-feature-new-ui/.env.example /liman_files/server
38+
RUN rm -rf core.zip
39+
40+
# PHP SANDBOX
41+
RUN wget "https://github.com/limanmys/php-sandbox/archive/refs/heads/master.zip" -O "sandbox.zip"
42+
RUN unzip -qq sandbox.zip
43+
RUN mkdir -p /liman_files/sandbox/php
44+
RUN mv php-sandbox-master/* /liman_files/sandbox/php/
45+
RUN rm -rf sandbox.zip php-sandbox-master
46+
47+
# EXT TEMPLATES
48+
RUN wget "https://github.com/limanmys/extension_templates/archive/master.zip" -O "extension_templates.zip"
49+
RUN unzip -qq extension_templates.zip
50+
RUN mkdir -p /liman_files/server/storage/extension_templates
51+
RUN mv extension_templates-master/* /liman_files/server/storage/extension_templates
52+
RUN rm -rf extension_templates.zip extension_templates-master
53+
54+
# RENDER ENGINE
55+
RUN curl -s https://api.github.com/repos/limanmys/fiber-render-engine/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d \" | wget -qi -
56+
RUN unzip liman_render*.zip
57+
RUN mv liman_render /liman_files/server/storage/liman_render
58+
59+
# COMPOSER
60+
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php
61+
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer
62+
RUN rm -rf composer-setup.php
63+
64+
RUN composer install --no-dev --no-scripts -d /liman_files/server
65+
RUN composer install --no-dev -d /liman_files/sandbox/php
66+
67+
# USERS
68+
RUN groupadd -g 2800 liman
69+
RUN useradd liman -u 2801 -g 2800 -m
70+
RUN useradd extuser -u 2802 -g 2800 -m
71+
72+
# PERMS
73+
RUN cp -f /liman_files/server/storage/limanctl /usr/bin/limanctl
74+
75+
# VNC SETTINGS
76+
RUN rm -rf /liman_files/keys/vnc
77+
RUN mkdir /liman_files/keys/vnc
78+
RUN chmod 700 /liman_files/keys/vnc
79+
RUN touch /liman_files/keys/vnc/config
80+
RUN chown liman:liman /liman_files/keys/vnc /liman_files/keys/vnc/config
81+
RUN chmod 700 /liman_files/keys/vnc/config
82+
83+
# SETTINGS
84+
RUN sed -i "s/www-data/liman/g" /etc/php/8.1/fpm/pool.d/www.conf
85+
RUN sed -i "s/www-data/liman/g" /etc/nginx/nginx.conf
86+
COPY storage/build_tools/docker/config/nginx_default /etc/nginx/sites-available/default
87+
COPY storage/build_tools/docker/config/nginx.conf /etc/nginx/sites-available/liman.conf
88+
RUN ln -s /etc/nginx/sites-available/liman.conf /etc/nginx/sites-enabled/liman.conf
89+
90+
# SERVICES
91+
RUN mkdir /run/php
92+
COPY storage/build_tools/docker/config/supervisor.conf /etc/supervisor/supervisor.conf
93+
COPY storage/build_tools/docker/config/supervisor /etc/supervisor/conf.d
94+
95+
# START LIMAN
96+
COPY storage/build_tools/docker/init.sh /tmp/init.sh
97+
RUN ["chmod", "755", "/tmp/init.sh"]
98+
RUN ["chmod", "+x", "/tmp/init.sh"]
99+
100+
# FREE UP SPACE
101+
RUN apt clean -yqq
102+
RUN apt autoclean -yqq
103+
104+
ENTRYPOINT ["/tmp/init.sh"]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Liman Core
1+
# Liman
22

3-
Liman Core allows you to centrally manage all servers in your IT processes remotely, with stable and secure way. You can improve the features with expandable extensions and modules.
3+
Liman allows you to centrally manage all servers, clients and network devices in your IT processes remotely, with stable and secure way. You can improve the features with expandable extensions and modules.
44

5-
More information on the Liman [website](https://liman.dev).
5+
More information on the Liman [website](https://liman.havelsan.com.tr).
66

77
## What is Liman?
88

@@ -13,23 +13,33 @@ As an open source version of Liman, it meets your basic needs for server managem
1313
* User and Role Management
1414
* Web based management
1515

16+
## Open Source Extensions
17+
18+
* Inventory (This open-source tool allows you to scan your network to discover connected devices and find their packages. It also provides statistical data for your devices on the network.)
19+
Download: [Extension](https://github.com/limanmys/liman-inventory) [Server](https://github.com/limanmys/inventory-server)
20+
21+
## Enterprise Extensions
22+
23+
* [Device Manager](https://liman.havelsan.com.tr/extensions/device-manager) (Manages Win/Linux servers and clients with our Agent)
24+
* [Network Monitor](https://liman.havelsan.com.tr/extensions/network-monitor)
25+
* [Network Explorer](https://liman.havelsan.com.tr/extensions/network-explorer) (Explores all devices on your network using switches and custom sensor agents)
26+
* Netconf Utility (Monitors switch interfaces and let you configure network devices)
27+
* [Domain Manager](https://liman.havelsan.com.tr/extensions/domain-manager)
28+
1629
## Install
1730

18-
Liman is packaged as DEB in Aciklab repository. Therefore, it supports Debian, Pardus and Ubuntu.
31+
Liman is packaged as DEB in Aciklab repository. Therefore, it supports Debian and RHEL based distributions.
1932
You can find the [installation documentation](https://docs.liman.dev/start/installing) for your Linux distribution.
2033

2134
## Authors
2235

23-
Liman Core started to be developed by the [Aciklab](https://aciklab.org) group in HAVELSAN and continues to be developed. Thanks to everyone who contributed.
36+
Liman started to be developed by the [Aciklab](https://aciklab.org) group in HAVELSAN and continues to be developed. Thanks to everyone who contributed.
2437

25-
Liman Core is sponsored by [HAVELSAN](https://havelsan.com.tr/en).
38+
Liman is sponsored by [HAVELSAN](https://havelsan.com.tr/en).
2639

2740
## License
2841

2942
MIT License
3043

31-
See [LICENSE](https://github.com/limanmys/core/blob/master/LICENSE) the full text.
32-
33-
### Development
3444

35-
From Liman Core 1.11.1 version, we are using PNPM as package manager. Due to Laravel limitations, you should install packages with this command: `pnpm install --shamefully-hoist`
45+
See [LICENSE](https://github.com/limanmys/core/blob/master/LICENSE) the full text.

apidoc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/Casts/Jsonb.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
namespace App\Casts;
4+
5+
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
6+
7+
class Jsonb implements CastsAttributes
8+
{
9+
/**
10+
* Cast the given value.
11+
*
12+
* @param \Illuminate\Database\Eloquent\Model $model
13+
* @param string $key
14+
* @param mixed $value
15+
* @param array $attributes
16+
* @return array
17+
*/
18+
public function get($model, $key, $value, $attributes)
19+
{
20+
return json_decode($value, true);
21+
}
22+
23+
/**
24+
* Prepare the given value for storage.
25+
*
26+
* @param \Illuminate\Database\Eloquent\Model $model
27+
* @param string $key
28+
* @param array $value
29+
* @param array $attributes
30+
* @return string
31+
*/
32+
public function set($model, $key, $value, $attributes)
33+
{
34+
return json_encode($value);
35+
}
36+
}

0 commit comments

Comments
 (0)