Application Management

Deploy an Application

You can create applications using both the dashboard and the CLI. The section below describes how to do it using both options.

Dashboard

You can create applications using Shipa's dashboard by click on the Applications link of your Shipa dashboard, which will take you to the application management screen.

12051205

Clicking on the Create app button will prompt you with the screen and options below:

12051205

Name: the name of the application.
Framework: the framework you want to leverage when deploying the application
Team: the team that should own the application

Once you click on Deploy, it will show the application with an idle status and to Running when the deployment is completed.

12051205

CLI

The command below creates a new application deployment using the application name:

shipa app deploy <appname> [--plan/-p plan name][--team/-t team owner] [--framework/-k framework name] [--description/-d description] [--tag/-g tag] -i IMAGE_URL --volume VOLUME_NAME --volume-mount-path VOLUME_MOUNT_PATH

To create an application, Administrators must be a member of at least one team. All teams that a user is a member of (see team-list) can access the app.

Command options:

  • --plan defines the plan to be used. The plan specifies how computing resources are allocated to the application. Typically, this defines limits for memory and swap usage and how much of the CPU share is allocated. The list of available plans is found by running the plan-list command. If this parameter is not informed, Shipa chooses the plan with the default flag set to true

  • --team describes which team is responsible for the created app. This is only needed if the current user belongs to more than one team, in which case this parameter is mandatory.

  • --framework defines to which framework the application is deployed. This parameter is required only if the user has more than one framework associated with the teams.

  • --description sets a description for the application. It is an optional parameter. If it is not set, the application will not have a description associated with it.

  • --tag applies a tag to an application. Multiple --tag parameters can be applied.

  • -i/--image docker image URL

  • --port Application exposed port

  • --private-image App image is stored in a private registry and requires authentication

  • --run-as-user The user to use for running pod's processes; root if not set.

  • --shipa-yaml The path to shipa.yaml

  • --step-interval Time interval between each step. Supported min: m, hour:h, second:s. ex. 1m, 60s, 1h (default "0")

  • --step-weight Canary traffic weight percentage for step. Should be between 0 and 100 (default 1)

  • --steps Number of steps to roll out the new deployment (default 1)

  • --volume Name of the volume to bind to the application.

  • --volume-mount-options Options for volume mount. (default [])

  • --volume-mount-path Path to mount a volume

  • --run-as-user The user to use for running pod's processes; root if not set.

Flags:

Flag

Description

-d, --description

(= "") application description

-g, --tag

(= []) application tag

-k, --framework

(= "") the framework to deploy the application

-p, --plan

(= "") the plan used to create the application

-t, --team

(= "") team owner app

-i, --image

The image to deploy in app

--port

Application exposed port

--internal-port strings

Application internal port

--private-image

App image is stored in a private registry and requires authentication

--run-as-user

The user to use for running pod's processes; root if not set.

--shipa-yaml

Path to shipa-yaml

--step-interval

Time interval between each step. Supported min: m, hour:h, second:s. ex. 1m, 60s, 1h (default "0")

--step-weight

Canary traffic weight percentage for step. Should be between 0 and 100 (default 1)

--steps

Number of steps to roll out the new deployment (default 1)

--volume

Name of the volume to bind to the application

--volume-mount-options

Options for volume mount. (default [])

--volume-mount-path

Path to mount a volume

Updating application deployment

You can edit applications using both the dashboard and the CLI. The section below describes how to do it using both options.

Dashboard

You can edit applications using Shipa's dashboard by click on the Applications link of your Shipa dashboard, which will take you to the application management screen.

12271227

Clicking on the Deploy button will prompt you with the screen and options below:

12271227

Once you click on Deploy, Shipa will start the update process.

CLI

The app deploy command should be used to update application deployment, its the same command you would use to create first deployment as well.

Allowing Access to an Application

Operators can use the app grant command to allow a team to access a specific application. A user needs to be a member of a team with access to the application to allow another team to access it.

shipa app grant <teamname> [-a/--app appname]

Flags:

Flag

Description

-a, --app

application name

Revoking Access to an Application

Operators can use the app revoke command to revoke a team’s permission to access an application. Access to the application is first required to revoke access from a team.

shipa app revoke <teamname> [-a/--app appname]

Note: An application cannot be orphaned. It must always have at least one authorized team.

Flags:

Flag

Description

-a, --app

application name

Changing Application Ownership

Apps can be moved from "Framework A" to "Framework B" and from "Team A" to "Team B," even when they don't have permission to see each other’s frameworks. This is done using the app update command.

shipa app update -a <app> -t <teamB> -k <frameworkB>

By default, the application is set to both teams, so "Team A" can still see the application just if the user may have made some mistake.

To remove the old "Team A" from the application, use the app revoke command.

shipa app revoke teamA -a <app>

Moving an Application

You can move applications between frameworks. You can achieve it using both the dashboard and the CLI. The section below describes how to do it using both options.

Dashboard

You can move an application using Shipa's dashboard by Clicking on Deploy and update the framework by selecting a different framework, application will be moved to changed framework's associated namespace and cluster.

CLI

Use shipa app deploy and using -k or --framework option provide a target framework where you want to move deployment of this application to.

Removing an Application

You can remove applications using both the dashboard and the CLI. The section below describes how to do it using both options.

Dashboard

You can remove an application using Shipa's dashboard by clicking on the Applications link of your Shipa dashboard.

To remove an application, use the Delete button.

12271227

CLI

shipa app remove [-a/--app appname] [-y/--assume-yes]

If the application is bound to any service instance, all binds will be removed before the application is deleted (For reference, please check the service unbind command).

Users must be members of a team that has access to the application before removing it. Users can remove any application that is listed when they run the app list command.

Flags:

Flag

Description

-a, --app

(= "") application name

-y, --assume-yes

(= false) don't ask for confirmation

Listing Applications

You can see available applications using both the dashboard and the CLI. The section below describes how to achieve it using both options.

Dashboard

You can list existing applications using Shipa's dashboard by clicking on the Applications link of your Shipa dashboard.

12051205

CLI

To list all applications that a user has access to, use the app list command.

shipa app list

Teams control application access. If a user's team has access to an application, this user also can access it.

Flags can be used to filter the list of applications.

Flags:

Flag

Description

-g, --tag

(= []) filter applications by tag. Can be used multiple times

-l, --locked

(= false) filter applications by lock status

-n, --name

(= "") filter applications by name

-k, --framework

(= "") filter applications by framework

-q

(= false) display only applications name

-s, --status

(= "") filter applications by unit status. Accepts multiple values separated by commas. Possible values can be: building, created, starting, error, started, stopped, asleep

-t, --team

(= "") filter applications by team owner

-u, --user

(= "") filter applications by owner

Application Information

You can access detailed information about an application using both the dashboard and the CLI. The section below describes how to do it using both options.d

Dashboard

You can see the details of an application using Shipa's dashboard by clicking on the Applications link of your Shipa dashboard. Once on the application page, click on the application name.

This will present you with a complete workflow of information on a specific application.

12271227

You can also use the Application Map button to understand the objects related to your application

16641664

CLI

Use the app info command to display information about a specific application, its state, platform, Git repository, and more. Users need to be team members with access to the application to see information about it.

shipa app info -a app-name

Flags:

Flag

Description

-a, --app

(= "") application name

Application Log

Use the app log command to show log entries for an application. These logs include everything the application sends to stdout and stderr, alongside logs from the Shipa server (deployments, restarts, etc.)

shipa app log [-a/--app appname] [-l/--lines numberOfLines] [-s/--source source] [-u/--unit unit] [-f/--follow]
  • --lines is optional, and by default, its value is 10.

  • --source is optional and allows filtering logs by log source (for example, application, the Shipa API).

  • --unit is optional and allows filtering by the unit. It's useful if the application has multiple units, and the user wants logs from a single unit.

  • --follow is optional and makes the command wait for additional log output

  • --no-date is optional and creates the log output without a date.

  • --no-source is optional and creates the log output without source information. This is useful when logs are very dense

Flags:

Flag

Description

-a, --app

(= "") application name

-f, --follow

(= false) follow logs

-l, --lines

(= 10) the number of log lines to display

--no-date

(= false) no date information

--no-source

(= false) no source information

-s, --source

(= "") the log from the given source

-u, --unit

(= "") the log from the given unit

Stopping Applications

shipa app stop [-a/--app appname] [-p/--process processname]

Stops an application, or one of the processes of the application.

Flags:

Flag

Description

-a, --app

(= "") application name

-p, --process

(= "") the process name

Starting Applications

shipa app start [-a/--app appname] [-p/--process processname]

Starts an application, or one of the processes of the application.

Flags:

Flag

Description

-a, --app

(= "") application name

-p, --process

(= "") the process name

Restarting Applications

shipa app restart [-a/--app appname] [-p/--process processname]

Restarts an application, or one of the processes of the application.

Flags:

Flag

Description

-a, --app

(= "") application name

-p, --process

(= "") the process name

Adding Units to Applications

shipa unit add <# of units> [-a/--app appname] [-p/--process processname]

Adds new units to a process of an application. Users need to have access to the application to be able to add new units to it.

Flags:

Flag

Description

-a, --app

(= "") application name

-p, --process

(= "") the process name

Removing Units from Applications

shipa unit remove <# of units> [-a/--app appname] [-p/-process processname]

Removes units from a process of an application. Users need to have access to the application to be able to remove units from it.

Flags:

Flag

Description

-a, --app

(= "") application name

-p, --process

(= "") the process name

Running Commands Inside Applications

shipa app run <command> [commandarg1] [commandarg2] ... [commandargn] [-a/--app appname] [-o/--once] [-i/--isolated]

Runs an arbitrary command in the application's containers. The base directory for all commands is the root of the application.

If users use the --once flag, Shipa will only run the command in one unit. Otherwise, it will run the command in all units.

Flags:

Flag

Description

-a, --app

(= "") application name

-i, --isolated

(= false) running in ephemeral container

-o, --once

(= false) running only one unit

Shell Into Application Container

shipa app shell [unit-id] -a/--app <appname> [-i/--isolated]

It opens a remote shell inside the unit, using the API server as a proxy. Users can access an application unit by just passing the application name or specifying the unit's id. Users can get the ID of the unit using the app info command.

Flags:

Flag

Description

-a, --app

(= "") application name

-i, --isolated

(= false) run shell in a new unit

Clicking on Deploy will give prompt you the following options:

Listing Deployments

shipa app deploy list [-a/--app <appname>]

List information about deploys for an application.

Flags:

Flag

Description

-a, --app

(= "") application name

Rolling Back Deployments

You can roll back application deployments using both the dashboard and the CLI. The section below describes how to do it using both options.

Dashboard

You can roll back a deployment using Shipa's dashboard by clicking on the Applications link of your Shipa dashboard. Once on the application page, click on the application name.

Inside the application details page, you have the Lifecycle tab.

16651665

The Lifecycle tab will present you with:
Application Timeline: where you can see details of every activity performed by users regarding this application
Logs: the log associated with every individual action
Rollbacks: You can see the images used on individual deployments and choose to roll back to a specific one. Note that performing a rollback will create a new activity in the Application Timeline column with the details of when it happened and the user who triggered it.

CLI

shipa app deploy rollback [-a/--app appname] [-y/--assume-yes] <image-name>

Deploys an existing image for an application. Users can list available images with the app deploy list command.

Flags:

Flag

Description

-a, --app

(= "") application name

-y, --assume-yes

(= false) don't ask for confirmation

Setting Application Certificate

shipa certificate set [-a/--app appname] [-c/--cname CNAME] [certificate] [key]

Creates or updates a TLS certificate into the specific application.

Flags:

Flag

Description

-a, --app

(= "") application name

-c, --cname

(= "") application CNAME

Unsetting Application Certificate

shipa certificate unset [-a/--app appname] [-c/--cname CNAME]

Unset a TLS certificate from a specific application.

Flags:

Flag

Description

-a, --app

(= "") application name

-c, --cname

(= "") application CNAME

Listing Application Certificates

shipa certificate list [-a/--app appname] [-r/--raw]

List an application TLS certificates.

Flags:

Flag

Description

-a, --app

(= "") application name

-r, --raw

(= false) display raw certificates


Did this page help you?