• Stars
    star
    126
  • Rank 284,543 (Top 6 %)
  • Language
    Go
  • License
    Other
  • Created over 11 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Command Line client for Scalingo PaaS

Scalingo-CLI v1.29.1

publish workflow

This repository contains the command line utility for the public PaaS Scalingo.

Visit our website.

How to Build?

The project is using Go, then you need a running Go environment: Official documentation

Once that's done, all you have to do is to go get the project, with the following command:

go get github.com/Scalingo/cli/scalingo

That's it, you've build the latest version of the Scalingo CLI (the binary will be present in $GOPATH/bin/scalingo)

How to Upgrade?

go get -u github.com/Scalingo/cli/scalingo

Run Behind a Proxy

You have to setup the following environment variables:

HTTP_PROXY=http://<proxy host>:<proxy port>
HTTPS_PROXY=https://<proxy host>:<proxy port>

Disable Update Checking

By default the CLI is making an HTTP request to learn if a newer version is available. To disable this feature, define the environment variable:

DISABLE_UPDATE_CHECKER=true

Command Help

NAME:
   Scalingo Client - Manage your apps and containers

USAGE:
   scalingo [global options] command [command options] [arguments...]

VERSION:
   1.29.1

AUTHOR:
   Scalingo Team <[email protected]>

COMMANDS:
     help  Shows a list of commands or help for one command

   Addons:
     addons                    List used add-ons
     addons-add                Provision an add-on for your application
     addons-remove             Remove an existing addon from your app
     addons-upgrade            Upgrade or downgrade an add-on attached to your app
     addons-info               Display information about an add-on attached to your app
     backups-config            Configure the periodic backups of a database
     database-enable-feature   Enable a togglable feature from a database
     database-disable-feature  Enable a togglable feature from a database
     backups                   List backups for an addon
     backups-create            Ask for a new backup
     backups-download          Download a backup
     backup-download           Download a backup

   Addons - Global:
     addons-list   List all addons
     addons-plans  List plans

   Alerts:
     alerts          List the alerts of an application
     alerts-add      Add an alert to an application metric
     alerts-update   Update an alert
     alerts-enable   Enable an alert
     alerts-disable  Disable an alert
     alerts-remove   Remove an alert from an application

   App Management:
     destroy                 Destroy an app /!\
     rename                  Rename an application
     apps-info               Display the application information
     open                    Open app on default web browser
     dashboard               Open app dashboard on default web browser
     logs, l                 Get the logs of your applications
     logs-archives, la       Get the logs archives of your applications and databases
     run, r                  Run any command for your app
     one-off-stop            Stop a running one-off container
     ps                      Display your application containers
     scale, s                Scale your application instantly
     restart                 Restart processes of your app
     send-signal, kill       Send SIGUSR1 or SIGUSR2 to your application containers
     force-https             Enable/Disable automatic redirection of traffic to HTTPS for your application
     sticky-session          Enable/Disable sticky sessions for your application
     router-logs             Enable/disable router logs for your application
     set-canonical-domain    Set a canonical domain.
     unset-canonical-domain  Unset a canonical domain.
     db-tunnel               Create an encrypted connection to access your database

   Autoscalers:
     autoscalers          List the autoscalers of an application
     autoscalers-add      Add an autoscaler to an application
     autoscalers-remove   Remove an autoscaler from an application
     autoscalers-update   Update an autoscaler
     autoscalers-disable  Disable an autoscaler
     autoscalers-enable   Enable an autoscaler

   CLI Internals:
     update     Update 'scalingo' SDK client
     changelog  Show the Scalingo CLI changelog from last version

   Collaborators:
     collaborators         List the collaborators of an application
     collaborators-add     Invite someone to work on an application
     collaborators-remove  Revoke permission to collaborate on an application

   Cron Tasks:
     cron-tasks  List the cron tasks of an application

   Custom Domains:
     domains         List the domains of an application
     domains-add     Add a custom domain to an application
     domains-remove  Remove a custom domain from an application
     domains-ssl     Enable or disable SSL for your custom domains

   Databases:
     redis-console                                    Run an interactive console with your Redis addon
     mongo-console, mongodb-console                   Run an interactive console with your MongoDB addon
     mysql-console                                    Run an interactive console with your MySQL addon
     pgsql-console, psql-console, postgresql-console  Run an interactive console with your PostgreSQL addon
     influxdb-console, influx-console                 Run an interactive console with your InfluxDB addon

   Deployment:
     deployments                                       List app deployments
     deployment-logs                                   View deployment logs
     deployment-follow                                 Follow deployment event stream
     deploy                                            Trigger a deployment by archive
     deployment-delete-cache, deployment-cache-delete  Reset deployment cache

   Display metrics of the running containers:
     stats  Display metrics of the currently running containers

   Environment:
     env        Display the environment variables of your apps
     env-get    Get the requested environment variable from your app
     env-set    Set the environment variables of your apps
     env-unset  Unset environment variables of your apps

   Events:
     user-timeline  List the events you have done on the platform
     timeline       List the actions related to a given app

   Git:
     git-setup  Configure the Git remote for this application
     git-show   Display the Git remote URL for this application

   Global:
     apps          List your apps
     create, c     Create a new app
     login         Login to Scalingo platform
     logout        Logout from Scalingo
     regions       List available regions
     config        Configure the CLI
     self, whoami  Get the logged in profile

   Integration Link:
     integration-link                    Show integration link of your app
     integration-link-create             Link your Scalingo application to an integration
     integration-link-update             Update the integration link parameters
     integration-link-delete             Delete the link between your Scalingo application and the integration
     integration-link-manual-deploy      Trigger a manual deployment of the specified branch
     integration-link-manual-review-app  Trigger a review app creation of the pull/merge request ID specified

   Integrations:
     integrations              List your integrations
     integrations-add          Link your Scalingo account with your account on a tool such as github.com
     integrations-delete       Unlink your Scalingo account and your account on a tool such as github.com
     integrations-import-keys  Import public SSH keys from integration account

   Log drains:
     log-drains-add     Add a log drain to an application
     log-drains         List the log drains of an application
     log-drains-remove  Remove a log drain from an application and its associated addons

   Notifiers:
     notifiers          List your notifiers
     notifiers-details  Show details of a notifier
     notifiers-add      Add a notifier for your application
     notifiers-update   Update a notifier
     notifiers-remove   Remove an existing notifier from your app

   Notifiers - Global:
     notification-platforms  List all notification platforms

   Public SSH Keys:
     keys         List your SSH public keys
     keys-add     Add a public SSH key to deploy your apps
     keys-remove  Remove a public SSH key

   Region migrations:
     migration-create  Start migrating an app to another region
     migration-run     Run a specific migration step
     migration-abort   Abort a migration
     migrations        List all migrations linked to an app
     migration-follow  Follow a running migration

   Review Apps:
     review-apps  Show review apps of the parent application

   Runtime Stacks:
     stacks      List the available runtime stacks
     stacks-set  Set the runtime stack of an app

GLOBAL OPTIONS:
   --addon value             ID of the current addon (default: "<addon_id>") [$SCALINGO_ADDON]
   --app value, -a value     Name of the app (default: "<name>") [$SCALINGO_APP]
   --remote value, -r value  Name of the remote (default: "scalingo")
   --region value            Name of the region to use
   --version, -v             print the version

Development Setup

In order to build the current development version and use it against the development services:

cd scalingo
go build .
SCALINGO_API_URL=http://172.17.0.1:3001 SCALINGO_AUTH_URL=http://172.17.0.1:1234 ./scalingo login --api-token <admin user API token>

Release a New Version

Get the latest version of the CLI:

git switch master
git pull origin master

(optional) Cherry Pick Commits Included in the Release

You may want to cherry pick the commits to include in the release. You first need to get the commit ID of the previous release (let's call it base commit ID). Then create a new branch and cherry pick all the commits you need, from the oldest to the most recent. Use the commit ID of the merge of every pull request you want to include in your release. Don't forget to also cherry pick the commit for the version bump.

git checkout <base commit ID>
git checkout -b v1.29.1
git cherry-pick -m 1 <commit ID number 1>
git cherry-pick -m 1 <commit ID number 2>
...
git cherry-pick -m 1 <commit ID number X>
git push --set-upstream origin v1.29.1

New Version Bump

Bump new version number in:

And commit these changes:

git switch --create release/1.29.1
git add .
git commit -m "Bump version 1.29.1"
git push --set-upstream origin release/1.29.1
gh pr create --reviewer=EtienneM --title "$(git log -1 --pretty=%B)"

Once the pull request merged, you can tag the new release.

Tag the New Release

git tag 1.29.1
git push origin master 1.29.1

Pushing the tag triggers a GitHub Action which builds the cross-platform binaries and create a new release.

When the GitHub Action finished, restart the Scalingo application cli-download-service:

scalingo restart --region osc-fr1 --app cli-download-service

It serves as cache between GitHub and our customers for a more efficient check of what is the new CLI version.

You can now update the changelog and tweet about it!

[Changelog] CLI - Release of version 1.29.1 https://cli.scalingo.com - More news at https://changelog.scalingo.com #cli #paas #changelog #bugfix

Add in a tweets thread the changelog of this new version.

More Repositories

1

go-ssh-examples

Go examples of SSH servers and clients
Go
278
star
2

docker-munin-server

Dockerization of a munin server behind nginx
Shell
46
star
3

go-etcd-lock

Go library to run locks over etcd.
Go
40
star
4

link

LinK is not Keepalived - Virtual IP manager backed by etcd
Go
39
star
5

etcd-discovery

Layer over etcd to do simple service discovery in Go
Go
35
star
6

go-etcd-cron

Library to run a distributed cron-like task scheduler
Go
30
star
7

sand

Autonomous service managing overlay networks with Docker integration
Go
16
star
8

php-buildpack

Official Scalingo buildpack - Based on CHH php buildpack, Nginx/PHP-fpm stack
Shell
16
star
9

heroku2scalingo

Heroku to Scalingo migration tool
Go
13
star
10

terraform-provider-scalingo

Terraform provider to provision Scalingo applications and databases
Go
10
star
11

wordpress-scalingo

12 factor Wordpress based on bedrock with S3 Plugin enabled
PHP
10
star
12

go-workers-examples

Sample applications go-workers <-> Sidekiq
Go
9
star
13

go-scalingo

Go client for Scalingo API
Go
9
star
14

sample-php-lumen

Sample application using Laravel - Lumen microframework
PHP
7
star
15

documentation

Scalingo Documentation Center
HTML
7
star
16

nginx-buildpack

Buildpack to deploy a customizable reverse proxy: nginx
Shell
6
star
17

go-utils

Small libraries and helpers concerning errors, logging, nsq
Go
6
star
18

scalingo_databases_rake_tasks-gem

Set of rake tasks to dump and restore databases (mysql, pgsql, mongo)
Ruby
5
star
19

terraform-provider-encrypted

Store secret encrypted
Go
5
star
20

go-handlers

Define a custom Handler and router based on gorilla + negroni with easy integration of middlewares
Go
5
star
21

scalingo.js

Javascript package to communicate with Scalingo API
TypeScript
5
star
22

logrus-rollbar

Rollbar Hook for logrus. Use errgo to create a complete stack of the error
Go
4
star
23

docker-cleaner

Small ruby script to remove old containers and old images
Ruby
4
star
24

sample-python-celery

Sample application for Python, using the asychonous worker Celery
HTML
4
star
25

scalingo-ruby-api

A ruby wrapper for the Scalingo API
Ruby
4
star
26

etcd-discovery-ruby

Ruby gem implementing go Appsdeck/etcd-discovery
Ruby
4
star
27

go-philae

Philae library implementation in go: probing backend service to build healthcheck endpoints
Go
3
star
28

go-fssync

Go library to copy files in a clever way
Go
3
star
29

ffmpeg-buildpack

Install FFMPEG alongside your apps
Shell
3
star
30

sample-go-martini

Sample Go application using Martini microframework
Go
3
star
31

sample-influxdb

Go
3
star
32

scala-buildpack

Buildpack for Scala and Play2 applications
Shell
2
star
33

metabase-scalingo

Deploy Metabase on Scalingo
Shell
2
star
34

go-netstat

Wrapper around data included in /proc/net/dev
Go
2
star
35

grafana-scalingo

One click deploy for Grafana on Scalingo
TypeScript
2
star
36

java-buildpack

Shell
2
star
37

sample-node-socketio

Sample application using Node.JS with socket.io library
HTML
2
star
38

sample-php-laravel

Sample PHP application using Lavarel Framework
PHP
2
star
39

redirector

Internal tool for appsdeck.eu redirection
Go
1
star
40

go-netns

Wrapper around the setns() syscall to enter network namespaces
Go
1
star
41

thumbor-scalingo

1
star
42

sample-php-yii2

Sample application using yii2 framework
PHP
1
star
43

sample-node-meanjs

Example Application with Node.js and the Framework MeanJS
JavaScript
1
star
44

sample-scala-scalatra

Sample application with Scala and the Micro-framework Scalatra
Shell
1
star
45

sample-elixir-plug

Sample application using Elixir and Plug
HTML
1
star
46

multi-buildpack

Multiple buildpack handling for deploying apps on Scalingo
Shell
1
star
47

errgo-rollbar

Binding between errgo Masking system and rollbar Stack building system
Go
1
star
48

sonarqube-scalingo

Minimal project to deploy SonarQube community edition on Scalingo
1
star
49

customer-terraform-docker-dev-prod-parity

Example project to deploy jar files on a provisioned environnement shared between Scalingo and Outscale.
HCL
1
star
50

scalingo-styles

Scalingo styles (CSS and JS files)
SCSS
1
star
51

sample-ruby-rails

Sample application with Ruby on Rails
Ruby
1
star
52

sample-php-drupal

Sample PHP application deploying Drupal on Scalingo
PHP
1
star
53

sample-node-mosca

Sample application using Node.JS Express and the MQTT server mosca
JavaScript
1
star
54

rollbar-cookbook

Small LWRP to notify Rollbar of deployments
Ruby
1
star
55

scalingo-provider-api-gem

Gem implementing the action doable by an addon Provider
Ruby
1
star
56

sample-elixir-phoenix

Sample application using Elixir and Phoenix Framework
1
star
57

clamav-buildpack

The official Scalingo Buildpack for ClamAV
Shell
1
star
58

sclng-backend-test-v1

Canvas for Scalingo Technical Test
Go
1
star
59

lua-resty-rollbar

Simple module to send errors to Rollbar
Lua
1
star