diff --git a/docs/10_Introduction/10_Installation_on_a_server.md b/docs/10_Introduction/10_Installation_on_a_server.md new file mode 100644 index 0000000000000000000000000000000000000000..b946cd9685af7f1d7cabeae8e3e11ef8a4129d59 --- /dev/null +++ b/docs/10_Introduction/10_Installation_on_a_server.md @@ -0,0 +1,4 @@ +# Installation of CISERVER # + +## Installation ## + diff --git a/docs/10_Introduction/20_Installation_with_Docker.md b/docs/10_Introduction/20_Installation_with_Docker.md new file mode 100644 index 0000000000000000000000000000000000000000..5633cd4b69baaad29201ec990558a836879ad896 --- /dev/null +++ b/docs/10_Introduction/20_Installation_with_Docker.md @@ -0,0 +1,114 @@ +# 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. diff --git a/docs/10_Introduction/30_Filestructure.md b/docs/10_Introduction/30_Filestructure.md new file mode 100644 index 0000000000000000000000000000000000000000..000c6a505415e0c5557fe79617396803c87e31b1 --- /dev/null +++ b/docs/10_Introduction/30_Filestructure.md @@ -0,0 +1,77 @@ +# 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 diff --git a/docs/10_Introduction/40_Dependencies.md b/docs/10_Introduction/40_Dependencies.md new file mode 100644 index 0000000000000000000000000000000000000000..b07292685e6a5c9a8003078e4c6a15fc05dea97e --- /dev/null +++ b/docs/10_Introduction/40_Dependencies.md @@ -0,0 +1,8 @@ + +# Dependencies # + +Related Components of the CI server + +* VCS +* Sync build packages +* Deploy targets diff --git a/docs/10_Server/Processes/10_Build.md b/docs/20_Server/Processes/10_Build.md similarity index 98% rename from docs/10_Server/Processes/10_Build.md rename to docs/20_Server/Processes/10_Build.md index 37e7c039190efd027cc923a424e693fb6f882165..751827b272bbfa8a57393b6accbd90cefc329cd5 100644 --- a/docs/10_Server/Processes/10_Build.md +++ b/docs/20_Server/Processes/10_Build.md @@ -12,7 +12,7 @@ A build is denied if a project has no activated phase the project settings. ## Overview ## - + ## Steps ## diff --git a/docs/20_Server/Processes/20_Rollout.md b/docs/20_Server/Processes/20_Rollout.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/20_Server/Usage/10_Login.md b/docs/20_Server/Usage/10_Login.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/20_Server/Usage/20_Project_overview.md b/docs/20_Server/Usage/20_Project_overview.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/_index.md b/docs/_index.md index 0a51e375d12e6734c8e647ac6cf63681a36701b3..bb1eb809e514615a3fdc328b6efe7a0076664f80 100644 --- a/docs/_index.md +++ b/docs/_index.md @@ -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 -``` + -### Temp ### +The project overview for a single project: -By default: /var/tmp/imldeployment + diff --git a/docs/images/screenshot_overview_all_projects.png b/docs/images/screenshot_overview_all_projects.png new file mode 100644 index 0000000000000000000000000000000000000000..badedafcbb2f157b8490b9d1d51f4864af05cf7b Binary files /dev/null and b/docs/images/screenshot_overview_all_projects.png differ diff --git a/docs/images/screenshot_overview_project.png b/docs/images/screenshot_overview_project.png new file mode 100644 index 0000000000000000000000000000000000000000..1f6fc60b23ef5b77c9df12471bcd685e1120794d Binary files /dev/null and b/docs/images/screenshot_overview_project.png differ diff --git a/readme.md b/readme.md index 64413a62428a5711831ba9c729d2f616706a32ce..2d54e8b049259b7079e707d22565ed94623178c1 100644 --- a/readme.md +++ b/readme.md @@ -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. + +