cloud-pipeline
cloud-pipeline copied to clipboard
Implement way to persist current setup of the system and deploy a new environmet out of saved configuration
Background Sometimes its can be very beneficial to be able to persist setup and all internal configuration (Application version, cp-global-config map, API system preferences, docker images) from existing environment. Later on this saved configuration can be used to deploy (or re-deploy) identical environment.
Approach
New pipectl command scrap
We can expand pipectl and add new command scrap which will collect the next information about the environment:
-
Application version (filename: app-version.json). Basically, response of the GET
/app/info:{ "version": "0.17.0.16801.5baeeb6f6923291180ab27ac2c38c1e00b7066d8", "components": { "pipe-cli": "f90c9a9eb1fffeea1457f4c2a164db68cf6942c1", "data-transfer-service": "f9207173b27a5734666baf888a0b6fff5d589d17", "cloud-pipeline-webdav-client": "22737b274b2b7f9fc6004a109509ea117adfdadf" } } -
System Preferences (filename: system-preferences.json). Response of the GET
/preferences[ { "name": "<>", "value": "<>", "preferenceGroup": "<>", "visible": true/false, "type": "STRING/.../..." }, ... ] -
Kubernetes
cp-config-globalconfigMap content in the format of env file (filename: cp-config-global.properties):KEY=value KEY1=value1 .... -
List of Cloud-pipeline services deployed (filename: cp-services.json)
["cp-api-srv", "cp-edge", ... ] -
List of docker containers deployed in format of (directory: dockers-manifest):
- manifest.txt
<registry-url>/library/centos:7,library/centos:7 <registry-url>/my-group/ubuntu:20.04,my-group/ubuntu:20.04 ..... - library/
- centos:7/
- icon.png
- README.md
- spec.json
- centos:7/
- my-group/
- ubuntu:20.04/
- icon.png
- README.md
- spec.json
- ubuntu:20.04/
- manifest.txt
-
List of users (filename: users.json):
[ { "id": 1, "userName": "<>", "roles": [ { "id": 1, "name": "ROLE_ADMIN", "predefined": true, "userDefault": false, "defaultProfileId": 1 }, ... ], "groups": [ "ROLE_ADMIN" ], "admin": true, "blocked": false, ... "attributes": { ... }, } ... ] -
Status of point-in-time configuration (filename: _pitc.csv)
app_version,0 app_services,0 configmap,0 system_preference,0 users,0 tools,0Each line represents name of the scraping process that was performed for environment and its status. F.i. line
app_version,0tells that for this point-in-time configuration application version was scraped and it was successful because it has status code0.