Plugin deplot¶
This project contains source code to allow automatic deployement in 'Plug'in Playground'
The Plug'in Playground¶
Your plug'in Docker playground, with sandboxed sessions on shared server(s) on the innovation network.
The TL;DR copy and paste version¶
This project is at the same time the deployment script and an example of automatic deployment.
- Deploy images
Copy the following section in your gitlab-ci, if you want to deploy a session with a docker image
you just built. Change the --docker-image
switch to whatever image you built, or want to deploy. The image can be from Artifactory, Gitlab registry, or Internet (using the artifactory dockerproxy)
Do not forget to add the stage deploy to your stages of the job.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | deploy_image: variables: VERSION: "0.1" SESSION_DURATION: "1h" stage: deploy image: name: registry.forge.orange-labs.fr/$CI_PROJECT_PATH:$VERSION tags: - innovation - docker - shared script: - deploy.py --session-duration $SESSION_DURATION --deploy image --docker-image registry.forge.orange-labs.fr/$CI_PROJECT_PATH:$VERSION --log-level debug --html-output-file $PWD/rapport.html artifacts: paths: - rapport.html expire_in: 1 day |
- Deploy compose files
Copy the following section in your gitlab-ci. The resulting session will have your compose images built, and ready to use. In my example, the compose folder in the project contains all that docker-compose.yml needs. Try to have a similar structure and adapt your --compose-dir
and --compose-file
variables as you see fit.
Do not forget to add the stage compose to your CI stages.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | deploy_compose: variables: VERSION: "0.1" SESSION_DURATION: "2h" stage: compose image: name: registry.forge.orange-labs.fr/$CI_PROJECT_PATH:$VERSION tags: - innovation - docker - shared script: - deploy.py --session-duration $SESSION_DURATION --deploy compose --compose-dir $CI_PROJECT_DIR/compose --compose-file docker-compose.yml --log-level debug --html-output-file $PWD/rapport.html artifacts: paths: - rapport.html expire_in: 1 day |
Implementation¶
More in atomdocs.