Csap Autoplay - csap-platform/csap-core GitHub Wiki
References: demo auto play
CSAP Auto Play enables teams to customize the application definitions as part of the installation , or post installation to install/update services, clusters, or configuration data (via cli or ui).
Benefits: Use of yaml enables quick modification of commonly modified attributes during initial setup, and fully automated updates of application post-install.
Alternative: Use the Application Editor to modify attributes, and apply changes.
As shown to the right - CSAP Platform/auto-plays includes several templates that can be used to jump start application definition. Simply browse to the folder (MUST be on csap-admin, not csap-agent):
- select the autoplay
- use the menu options to preview/apply the changes
- Create a csap-auto-play.yaml (bash helpers or direct edit shown below)
- Place it in the location:
- For installation: ensure it is copied to /root add: csap-install.sh -csapAutoPlay …
- For updates of a running application: place it in /opt/csap click apply on csap editor ui
After the agent has (re) started on the host, note that:
- /opt/csap/completed-csap-auto-play.yaml has been created
- changes have been updated into application
operator: modify
target: default
environments:
base: test
name: my-new-environment # optional - defaults to base value
application-name: auto-play-demo-application
git: https://moc-bb.lab.sensus.net/bitbucket/update-with-your-repo
branch: my-branch-name
# settings will be merged with existing settings: modified if exists, inserted if not
settings:
loadbalancer-url: http://my.loadbalancer.com
monitorDefaults:
# host disk
maxDiskPercent: 87
# service disk
max_diskUtil: 299
configuration-maps:
global:
a_new_variable: a_new_value
$$a-template-variable: $$a-template-value
cluster-hosts:
base-os: [ host-1, host-2, host-3, host-4 ]
kubernetes-provider: [ 1, 2, 3, 4 ]
kubernetes-masters: [ 1 ]
service-templates:
simple-service.docker.image: "nginx:latest"
---
operator: create
target: scripts/hi.sh
content: |
#!/bin/bash
echo "hi"