Sign inSign up

octree/jelastic-cli

By octree

•Updated 3 days ago

Image
0

2.8K

octree/jelastic-cli repository overview

⁠Jelastic CLI Docker Image

Docker image for running Jelastic CLI commands.

⁠Usage

⁠Authentication

The image requires authentication via environment variables:

  • JELASTIC_USERNAME: Your Jelastic account login
  • JELASTIC_PASSWORD: Your Jelastic account password
  • JELASTIC_HOST: Your Jelastic platform URL (e.g., https://app.jelastic.com)
⁠Examples
⁠List environments
docker run --rm \
  -e [email protected] \
  -e JELASTIC_PASSWORD=your-password \
  -e JELASTIC_HOST=https://app.jelastic.com \
  octree/jelastic-cli \
  environment/control/getenvs
⁠Get environment info
docker run --rm \
  -e [email protected] \
  -e JELASTIC_PASSWORD=your-password \
  -e JELASTIC_HOST=https://app.jelastic.com \
  octree/jelastic-cli \
  environment/control/getenvinfo --envName your-env-name
⁠Interactive shell
docker run --rm -it \
  -e [email protected] \
  -e JELASTIC_PASSWORD=your-password \
  -e JELASTIC_HOST=https://app.jelastic.com \
  octree/jelastic-cli \
  bash
⁠Install a template

Templates from the local decidim directory (copied into the image at /root/jelastic/decidim) can be installed using the marketplace JPS installer:

docker run --rm \
  -e [email protected] \
  -e JELASTIC_PASSWORD=your-password \
  -e JELASTIC_HOST=https://app.jelastic.com \
  octree/jelastic-cli \
  marketplace/jps/install \
  --jps /root/jelastic/decidim/scripts/deploy.yml \
  --envName your-env-name \
  --settings '{"key":"value"}'

⁠Available CLI Commands

The Jelastic CLI is installed at /root/jelastic. You can pass commands as paths relative to /root/jelastic (e.g. environment/control/getenvs).

  • environment/control/getenvs - List all environments
  • environment/control/getenvinfo - Get environment details
  • users/authentication/signin - Sign in (handled automatically by entry.sh)

For a full list of available commands, run:

docker run --rm \
  -e [email protected] \
  -e JELASTIC_PASSWORD=your-password \
  -e JELASTIC_HOST=https://app.jelastic.com \
  octree/jelastic-cli \
  --help

⁠SBOM (Software Bill of Materials)

Pipeline SBOMs are published images, not one report per Jelastic environment. sbom:decidim and sbom:decidim-next in decidim/.gitlab-ci.yml scan octree/voca-decidim:0.32 and octree/voca-decidim:resolute-0.32. sbom:memcached in memcached/.gitlab-ci.yml scans octree/voca-memcached:latest. All three use Syft and publish CycloneDX for GitLab’s dependency list. They run on every main pipeline and every scheduled pipeline. Who reads this: the operator checking Secure > Dependency list on the default branch.

⁠Binaries

Scripts in the image (e.g. when running docker run ... octree/jelastic-cli bash) or used by CI. Require JELASTIC_LOGIN, JELASTIC_PASSWORD, JELASTIC_HOSTER where Jelastic auth is needed.

jelastic-signin

  • Purpose: Sign in to Jelastic; required before any Jelastic CLI call in the session.
  • Example: jelastic-signin

gitlab-env-inject

  • Purpose: Fetch CI/CD variables scoped to a GitLab environment and write KEY=value lines to .env (or VOCA_ENV_FILE).
  • Example: gitlab-env-inject VOCA-CH then set -a && . .env && set +a

gitlab-env-sync

  • Purpose: Sync GitLab environments from Jelastic getenvs: create/update environments and ENVNAME/JELASTIC_HOSTER variables, remove obsolete ones. Expects getenvs JSON on stdin.
  • Example: GETENVS=$(/entry.sh /root/jelastic/environment/control/getenvs) && printf '%s\n' "$GETENVS" | gitlab-env-sync

gitlab-env-yml

  • Purpose: Read getenvs JSON from stdin; output YAML with one jelastic-cli:backup job per Jelastic env for the given region (ch|ue|usa).
  • Example: printf '%s\n' "$GETENVS" | gitlab-env-yml ch jelastic/.gitlab-ci.envs-CH.yml

gitlab-mr-create

  • Purpose: Create a branch with the envs YAML file, commit it, and open a merge request. Path from arg or GITLAB_CI_OUT_FILE.
  • Example: gitlab-mr-create jelastic/.gitlab-ci.envs-CH.yml

⁠CI/CD

Pipelines use multi-region GitLab environments VOCA-CH, VOCA-UE, VOCA-USA. Each maps to a Jelastic hoster; JELASTIC_HOSTER and other secrets are set in that environment’s CI/CD variables.

  • Sync environments (.gitlab-ci.sync-environments.yml): Jobs jelastic-cli:sync-environments:ch, :ue, :usa run in the matching VOCA-<REGION> environment. They sign in, call getenvs, run gitlab-env-sync (create/update GitLab environments and ENVNAME/JELASTIC_HOSTER), then gitlab-env-yml to generate jelastic/.gitlab-ci.envs-{CH,UE,USA}.yml (one backup job per Jelastic env), then gitlab-mr-create to open an MR with the updated YAML. The main .gitlab-ci.yml includes these env files so backup jobs exist for every live env.

  • SBOM: sbom:decidim, sbom:decidim-next (decidim/.gitlab-ci.yml), and sbom:memcached (memcached/.gitlab-ci.yml) scan the published images and publish CycloneDX. They run on every main pipeline and every scheduled pipeline.

  • Backup stage: Jobs extending .jelastic-backup are generated by sync and listed in .gitlab-ci.envs-{CH,UE,USA}.yml.

  • Scheduled pipelines: Schedule triggers run sync (to refresh the env list and open an MR), build the jelastic-cli image, sbom:decidim, sbom:decidim-next, sbom:memcached, and jelastic-cli:nightly.

⁠API reference

The Platform API is documented at docs.jelastic.com/api/⁠. The REST API can be used as an alternative to the CLI; OpenAPI/Swagger-style specs are referenced from that documentation.

Tag summary

Content type

Image

Digest

sha256:c94cc09c0…

Size

84.9 MB

Last updated

3 days ago

docker pull octree/jelastic-cli