All Projects → kiwicom → Crane

kiwicom / Crane

Licence: mit
⬆ A GitLab CI ready image to upgrade services in Rancher

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Crane

Gitlab Time Tracker
🦊🕘 A command line interface for GitLab's time tracking feature.
Stars: ✭ 371 (+312.22%)
Mutual labels:  gitlab, docker-image
Glci
🦊 Test your Gitlab CI Pipelines changes locally using Docker.
Stars: ✭ 471 (+423.33%)
Mutual labels:  gitlab-ci, gitlab
Gitlab Ci Android
GitLab CI image for building Android apps
Stars: ✭ 399 (+343.33%)
Mutual labels:  gitlab-ci, docker-image
gitlab-job-log-viewer
Browser extension for code highlighting raw logs in Gitlab CI
Stars: ✭ 21 (-76.67%)
Mutual labels:  gitlab, gitlab-ci
Lab
Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
Stars: ✭ 911 (+912.22%)
Mutual labels:  gitlab-ci, gitlab
gitlab-setup
A Packer / Terraform / Ansible configuration to install Gitlab and Gitlab-CI
Stars: ✭ 53 (-41.11%)
Mutual labels:  gitlab, gitlab-ci
Gitlab Ci Dashboard
📊 Dashboard for monitoring GitLab CI builds and pipelines for TV
Stars: ✭ 79 (-12.22%)
Mutual labels:  gitlab-ci, gitlab
gitlab-chart
Kubernetes Helm chart to deploy GitLab
Stars: ✭ 59 (-34.44%)
Mutual labels:  gitlab, gitlab-ci
Docker Gitlab
Dockerized GitLab
Stars: ✭ 7,084 (+7771.11%)
Mutual labels:  gitlab, docker-image
Vrnetlab
Run virtual routers with docker
Stars: ✭ 731 (+712.22%)
Mutual labels:  gitlab-ci, docker-image
gitlab-runner
GitLab Runner (Docker image) for ARM devices, this is a mirror repository of
Stars: ✭ 17 (-81.11%)
Mutual labels:  gitlab, gitlab-ci
Kdtool
Kubernetes deployment utility
Stars: ✭ 47 (-47.78%)
Mutual labels:  gitlab-ci, gitlab
godot-ci
Docker image to export Godot Engine games. Templates for Gitlab CI and GitHub Actions to deploy to GitLab Pages/GitHub Pages/Itch.io.
Stars: ✭ 316 (+251.11%)
Mutual labels:  gitlab, gitlab-ci
gitlab-ci-discord-webhook
⛓ Here's your serverless solution for sending build status from GitLab CI to Discord as webhooks.
Stars: ✭ 32 (-64.44%)
Mutual labels:  gitlab, gitlab-ci
gitlab-docker-rancher-letsencrypt-setup
Automated private dev environment with docker, gitlab CI/CD...
Stars: ✭ 15 (-83.33%)
Mutual labels:  gitlab, rancher
Gitlab Ci Pipeline Php
☕️ Docker images for test PHP applications with Gitlab CI (or any other CI platform!)
Stars: ✭ 451 (+401.11%)
Mutual labels:  gitlab-ci, gitlab
gitlab-ci-android-fastlane
Docker image for building android apps on Gitlab CI
Stars: ✭ 25 (-72.22%)
Mutual labels:  gitlab, gitlab-ci
godot-cpp-ci
Docker image and Github Actions to automatically compile Godot C++ GDNative libraries.
Stars: ✭ 21 (-76.67%)
Mutual labels:  gitlab, gitlab-ci
Gitlab Ce Zh
GitLab Community Edition (中文社区版)
Stars: ✭ 594 (+560%)
Mutual labels:  gitlab, docker-image
Hetzner Gitlab Runner
Autoscale gitlab ci runners on hetzner cloud
Stars: ✭ 36 (-60%)
Mutual labels:  gitlab-ci, docker-image

crane

crane logo - an origami crane

A GitLab CI ready image to upgrade services in Rancher. See the whole story on our blog at code.kiwi.com!

Python: 3.7 Code style: black Discord Gitlab pipeline status (branch)

Usage

  1. Deploy your application on Rancher manually, with an image tagged with a git reference (our recommendation is to use the commit SHA, but you can also use git tags.)

  2. Get a Rancher Environment API key and add the API keypair as secret variables in the project, named RANCHER_ACCESS_KEY and RANCHER_SECRET_KEY.

  3. Also add RANCHER_URL and RANCHER_ENV_ID, preferably in secret variables, or in .gitlab-ci.yml. (In the example URL https://rancher.example.com/env/1a81/apps/stacks/1e551/services/1s1456/containers the environment ID is 1a81. This ID always starts with 1a.)

  4. Add something like this to your .gitlab-ci.yml:

    stages:
      # [...]
      - deploy
    
    deploy-production:
      stage: deploy
      image: kiwicom/crane:3.2.1
      script:
        - crane --stack my-app --service api --service worker
      environment:
        name: production
        url: https://my-app.example.com/
      when: manual
    

Settings

CLI flag Environment variable Required Default
--url RANCHER_URL Yes
--access-key RANCHER_ACCESS_KEY Yes
--secret-key RANCHER_SECRET_KEY Yes
--env RANCHER_ENV_ID Yes
--stack RANCHER_STACK_NAME Yes
--new-commit CRANE_NEW_COMMIT No HEAD
--new-image CRANE_NEW_IMAGE No None
--service RANCHER_SERVICE_NAME No app
--sidekick RANCHER_SIDEKICK_NAME No None
--batch-size CRANE_BATCH_SIZE No 1
--batch-interval CRANE_BATCH_INTERVAL No 2
--start-first CRANE_START_FIRST No False
--sleep-after-upgrade CRANE_SLEEP_AFTER_UPGRADE No 0
--manual-finish CRANE_MANUAL_FINISH No False

Integrations & Extensions

Slack

When --slack-token is set, crane can post an announcement to --slack-channel with details about the ongoing deployment. You can use --slack-link to add useful URLs to this announcements such as Datadog dashboards, Sentry issues, or the project repository. You can set --slack-channel multiple times; all channels will have the same annnouncement posted to them. If you're setting the channel names via the environment variable, separate them with a space.

CLI flag Environment variable Details
--slack-token CRANE_SLACK_TOKEN Slack API token
--slack-channel CRANE_SLACK_CHANNEL Slack channels to announce in
--slack-link CRANE_SLACK_LINK links to mention in Slack

Sentry

With --sentry-webhook, crane can post release details to Sentry. Release tracking is useful to provide additional context to errors tracked in Sentry.

CLI flag Environment variable Details
--sentry-webhook CRANE_SENTRY_WEBHOOK Sentry release webhook URL

Datadog

If you set an API key with --datadog-key, Crane will post successful and failed releases to your Datadog event feed. These events can then be marked on charts and displayed on dashboards.

CLI flag Environment variable Details
--datadog-key CRANE_DATADOG_KEY URLs to post release info to

Generic webhooks

With the --webhook-url option, you can specify URLs that crane will send release info to, in its own format. One use for this is for analytics; if somebody sets up a listener for these events, they'll have the data needed to identify correlations between releases and changes in user behavior or sales numbers.

CLI flag Environment variable Details
--webhook-url CRANE_WEBHOOK_URL URLs to post release info to
--webhook-token CRANE_WEBHOOK_TOKEN Auth token for webhooks
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].