Skip to content
Snippets Groups Projects
Commit dca8f58d authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update docs

parent 120542af
No related branches found
No related tags found
No related merge requests found
...@@ -39,3 +39,45 @@ Then create a folder for log data. As root: ...@@ -39,3 +39,45 @@ Then create a folder for log data. As root:
```shell ```shell
mkdir -p /var/log/imldeployment-client/ mkdir -p /var/log/imldeployment-client/
``` ```
## Automation
This is an example for Ansible.
Execute the `deploy_app.sh [PROFILENAME]` as root.
Snippet of a playbook:
```yaml
# ---------- install deployment profile
- name: Deployment profile
hosts: web
become: yes
become_user: root
vars:
deploy_profile_name: my_ci_project_id
roles:
- iml.deployment_profile
tags:
- rollout
```
Snippet of the Ansible role iml.deployment_profile:
```yaml
# run deploy script
- name: '{{ deploy_profile_name }} - run deployment client'
shell: |
{{ CONST.imldeployment.clientdir }}/deploy_app.sh {{ deploy_profile_name }}
register: out_install
ignore_errors: yes
- debug: var=out_install.stdout.split("\n")
when: out_install.rc > 0
- name: 'check returncode of deployment'
fail: msg="ERROR - occured. See output in the debug task above."
when: out_install.rc > 0
```
...@@ -6,12 +6,37 @@ ...@@ -6,12 +6,37 @@
This is the main deployment script. This is the main deployment script.
```txt ```txt
./deploy_app.sh [PROFILENAME] ./deploy_app.sh -h
<<<<<<<<<<##########| IML - DEPLOYMENT SCRIPT |##########>>>>>>>>>>
HELP
Load one or more profiles profile to deploy an application.
If the download file is not newer then it does not extract files and does not
run pre and post hooks - it updates the config files only and sets the owner.
Syntax:
deploy_app.sh [OPTION] [PROFILE(S)]
Optioms:
-h | show this help and exit
-f | force full installation even if the download file is not newer
-l | list exiting profile names
Profile(s):
Set one or more valid profile names. By default it loops over all profiles.
This prameter limits the execution to the given profiles.
Use option -l to get a list of profiles.
``` ```
If you start it without parameter it will loop over all existing profiles. If you start it without parameter it will loop over all existing profiles.
You can add an existing profile name to limit the execution to that profile only. You can add an existing profile name to limit the execution to that profile only.
To start a single profile start `./deploy_app.sh -l` to get a list of exisring configured profiles
and then `./deploy_app.sh [PROFILE]`.
## ./bin/create_config.sh ## ./bin/create_config.sh
The script is used to read a template (*.erb) to replace simple placeholders The script is used to read a template (*.erb) to replace simple placeholders
......
# IML deployment client # IML deployment client
This client is a set of bash scripts to deploy a package that was built on th IML CI server. This client is a set of bash scripts to deploy a package that was built on th IML CI server.
It handles a secure download, extracts the package, generates configs.
```mermaid
graph LR
CI(CI deployment web gui ) --> |Build package| PkgDir
PkgDir[Package dir]
PkgDir --> |rsync| Pkg1
PkgDir --> |rsync| Pkg2
PkgDir --> |rsync| Pkg3
Pkg1(CI package server 1) --> |secure download| DeployClient
Pkg2(CI package server N)
Pkg3(Puppet master)
subgraph Appserver
DeployClient --> |installs| ApplicationA(Application A)
DeployClient --> |installs| ApplicationB(Application B)
end
```
This project is related to This project is related to
...@@ -37,6 +59,6 @@ Tested environments: ...@@ -37,6 +59,6 @@ Tested environments:
* Extraction to target dir * Extraction to target dir
* Cleanup: delete all files in target dir that are not included in the software package * Cleanup: delete all files in target dir that are not included in the software package
* Create (config) files by inserting strings into placeholders * Create (config) files by inserting strings into placeholders
* Several hooks to allow custom actions * Several hooks to allow custom actions, eg. restart a service un changes
* Handle multiple applications on a machine (aka profiles) * Handle multiple applications on a machine (aka profiles)
* Writes a logfile per execution and application (and to stdout) * Writes a logfile per execution and application (and to stdout)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment