Skip to content
Snippets Groups Projects
Commit aecf7139 authored by hahn's avatar hahn
Browse files

update docs

parent 22d13d9c
No related branches found
No related tags found
1 merge request!195534 add docker
This commit is part of merge request !19. Comments created here will be created in the context of that merge request.
# Installation of CISERVER #
## Installation ##
# Installation with a local Docker service #
For development a docker environment is part of the repository data.
## Requirements ##
* Linux system
* a running rootless Docker service
* tools/ packages:
* Git
* Docker-compose
* facl to set ACL for write permissions for your user and the webservice of the container
* sudo permssions
* to set ACL permissions with setfacl
* to remove tmp data
## Get Sources ##
As your local user execute the following steps:
```bash
cd [somewhere]
git https://git-repo.iml.unibe.ch/iml-open-source/imldeployment.git
cd imldeployment
```
## Set permissions ##
In the folder `docker` are all configurations and helpers to run a docker container.
In it is an `init.sh` to set environment.
```shell
./docker/init.sh
```
You get a menu.
```txt
>>>>> MENU
g - remove git data of starterkit
i - init application: set permissions
t - generate files from templates
T - remove generated files
u - startup containers docker-compose up -d
s - shutdown containers docker-compose stop
r - remove containers docker-compose rm -f
m - more infos
c - console (bash)
select >
```
Then press `i` and `Return` to set permissions.
This sets the acl permissions for the subdirs
* public_html
* config
* data
You will see something like that:
```txt
+ for mywritedir in ${WRITABLEDIR}
+ echo '--- ../public_html'
--- ../public_html
+ sudo setfacl -bR ../public_html
+ sudo setfacl -dRm u:231104:rwx,axel:rwx ../public_html
+ sudo setfacl -Rm u:231104:rwx,axel:rwx ../public_html
+ for mywritedir in ${WRITABLEDIR}
+ echo '--- ../config'
--- ../config
+ sudo setfacl -bR ../config
+ sudo setfacl -dRm u:231104:rwx,axel:rwx ../config
+ sudo setfacl -Rm u:231104:rwx,axel:rwx ../config
+ for mywritedir in ${WRITABLEDIR}
+ echo '--- ../data'
--- ../data
+ sudo setfacl -bR ../data
+ sudo setfacl -dRm u:231104:rwx,axel:rwx ../data
+ sudo setfacl -Rm u:231104:rwx,axel:rwx ../data
+ set +vx
```
## Start container ##
Then press `u` and `Return` to run `docker-compuse up`.
On the 1st run it needs to download the PHP docker image with Apache httpd and takes a few more seconds.
If ist is up you can run <http://localhost:8002/> in your webbrowser.
## Change port ##
If you need to change the port then stop a running container.
Edit `docker/init.sh.cfg` and set a new port
```txt
...
# web port 80 in container is seen on localhost as ...
APP_PORT=8002
...
```
After any change in init.sh.cfg we update the configs with
```shell
./docker/init.sh
```
Then press `t` (generate files from templates) + `Return`.
If you start the container again the application is available under the new port.
# File structure #
* web - ui and api
* data dir - configuration, database, built archives
* temp area - checked out projects to read comit messages
## Approot and website ##
Default: /var/www/[YOUR-DOMAIN]/
```txt
.
├── api
├── appmonitor
│ ├── classes
│ └── plugins
│ └── checks
├── ~cache
├── deployment
│ ├── classes
│ │ └── tests
│ ├── images
│ ├── js
│ ├── pages
│ └── plugins
│ ├── build
│ │ └── tgz
│ └── rollout
│ ├── awx
│ ├── default
│ └── ssh
├── valuestore
│ ├── classes
│ ├── data
│ └── tests
├── vendor
│ ├── bootstrap3
│ ├── font-awesome
│ ├── font-awesome-4.7.0
│ │ ├── css
│ │ └── fonts
│ ├── jquery
│ │ ├── 3.3.1
│ │ └── 3.4.1
│ ├── medoo
│ │ └── src
│ ├── shooker
│ ├── spyc
│ └── vis
│ └── 4.21.0
│ └── img
│ └── network
├── versions
│ ├── classes
│ └── data
└── webservice
```
## Data ##
By default: /var/imldeployment
```txt
imldeployment/
├── build << build directories
├── data
│ ├── database
│ ├── projects
│ └── sshkeys
├── defaults
└── packages << output data of buils
└── _files
```
## Temp ##
By default: /var/tmp/imldeployment
# Dependencies #
Related Components of the CI server
* VCS
* Sync build packages
* Deploy targets
......@@ -12,7 +12,7 @@ A build is denied if a project has no activated phase the project settings.
## Overview ##
![Build process](../../../docs/images/processes-build.png "Build process")
![Build process](./../../../../images/processes-build.png "Build process")
## Steps ##
......
......@@ -13,7 +13,29 @@ Free software and Open Source from University of Bern :: IML - Institute of Medi
CI node that checks out projects from git repositories and builds an deployable archive.
The archives can be synched to multiple deployment targets e.g. puppet master or a protected software archive.
## Related projects ##
```mermaid
flowchart LR
subgraph CI server
CI(CI<br>deployment<br>web gui) --> |Build<br>package| PkgDir
PkgDir[Package<br>dir]
end
PkgDir --> |rsync| Pkg1
PkgDir --> |rsync| Pkg2
PkgDir --> |rsync| Pkg3
Pkg1
Pkg1(CI package<br>server 1) --> |secure<br>download| DeployClient
Pkg2(CI package<br>server N)
Pkg3(Puppet master)
DeployClient --> |installs| ApplicationA(Application A)
DeployClient --> |installs| ApplicationB(Application B)
```
This project is related to
* CI package server <https://git-repo.iml.unibe.ch/iml-open-source/ci-pkg>
* Deployment client written in bash <https://git-repo.iml.unibe.ch/iml-open-source/imldeployment-client>
......@@ -32,80 +54,12 @@ The archives can be synched to multiple deployment targets e.g. puppet master or
* sends messages (email, Slack)
* API to start a build from somewhere, e.g. from a devops workplace or Gitlab server
## file structure ##
* web - ui and api
* data dir - configuration, database, built archives
* temp area - checked out projects to read comit messages
### Approot and website ###
Default: /var/www/[YOUR-DOMAIN]/
```txt
.
├── api
├── appmonitor
│ ├── classes
│ └── plugins
│ └── checks
├── ~cache
├── deployment
│ ├── classes
│ │ └── tests
│ ├── images
│ ├── js
│ ├── pages
│ └── plugins
│ ├── build
│ │ └── tgz
│ └── rollout
│ ├── awx
│ ├── default
│ └── ssh
├── valuestore
│ ├── classes
│ ├── data
│ └── tests
├── vendor
│ ├── bootstrap3
│ ├── font-awesome
│ ├── font-awesome-4.7.0
│ │ ├── css
│ │ └── fonts
│ ├── jquery
│ │ ├── 3.3.1
│ │ └── 3.4.1
│ ├── medoo
│ │ └── src
│ ├── shooker
│ ├── spyc
│ └── vis
│ └── 4.21.0
│ └── img
│ └── network
├── versions
│ ├── classes
│ └── data
└── webservice
```
## Screenshots ##
### Data ###
The overview over all projects is the starting page after login. It shows all projects and which build is rolled out to which phase.
By default: /var/imldeployment
```txt
imldeployment/
├── build << build directories
├── data
│ ├── database
│ ├── projects
│ └── sshkeys
├── defaults
└── packages << output data of buils
└── _files
```
![Project overview](./../images/screenshot_overview_all_projects.png)
### Temp ###
The project overview for a single project:
By default: /var/tmp/imldeployment
![Project overview](./../images/screenshot_overview_project.png)
docs/images/screenshot_overview_all_projects.png

132 KiB

docs/images/screenshot_overview_project.png

106 KiB

......@@ -31,3 +31,10 @@ The archives can be synched to multiple deployment targets e.g. puppet master or
* trigger rollout via ssh command or AWX API call (can be extended with a plugin)
* receives install status
* sends messages (email, Slack)
## Screenshot ##
The overview over all projects is the starting page after login. It shows all projects and which build is rolled out to which phase.
![Project overview](docs/images/screenshot_overview_all_projects.png)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment