The automation does:
- Verify the Container runtime is running
- Log in to IBM Cloud
- Build and push the container image to IBM Cloud Container Image Registry (the container tag is the last GitHub commit id)
- Create a new Code Engine project
- Create an IBM Cloud Container Image Registry access for the Code Engine project
- Deploys the
Shelly 3EM
-Cloudant
-Grafana
-connection-server to Code Engine - Shows the plain
kubectl
information for the containers in the project - Shows the plain
kubectl
log information for the first container - Verifies the deployment
- Set global environment variable for later usage
- Saves the deployment configurations in the
deployment-log
foldersall
andlast
- IBM Cloud CLI
- IBM Cloud Code Engine Plugin
- IBM Cloud Container Registry Plugin
kubectl
command line- GitHub CLI
ibmcloud update
ibmcloud plugin list
ibmcloud plugin update container-registry
ibmcloud plugin update container-service
ibmcloud plugin update code-engine
ibmcloud plugin update cloudant
git clone https://github.com/thomassuedbroecker/shelly-cloudant-grafana.git
cd shelly-cloudant-grafana
- Set the
Code Engine
andIBM Cloud
environment variables
cat ./scripts/ce-deployment/.env_template > ./scripts/ce-deploment/.env
- Set the environment variables
cat ./code/.env_template > ./.env
cd scripts/ce-deployment
sh deploy-to-code-engine.sh
2.5. Create a new application configuration, reflect the reason for the change in the name, and save the change
You can redeploy an application based on existing information by providing the following information as parameters.
- Repository URL
- Commit ID
- ".env" file with the working configuration
export REUSE_COMMAND=reuse
export COMMIT_ID=XXXXXXX
export REPOSITORY_URL=https://github.com/thomassuedbroecker/shelly-cloudant-grafana.git
export ENVIORNMENT_FILENAME=my-restore.env
sh deploy-to-code-engine.sh $REUSE_COMMAND $COMMIT_ID $REPOSITORY_URL $ENVIORNMENT_FILENAME