Application Management

Creating 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.

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

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 Create, it will show the application with an idle status.

CLI

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

shipa app create <appname> [--plan/-p plan name][--team/-t team owner] [--framework/-k framework name] [--description/-d description] [--tag/-g tag]...

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.

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

Updating an Application

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.

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

Name: the name of the application. (can't be updated)
Framework: the framework you want to leverage when deploying the application
Team: the team that should own the application

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

CLI

The app update command updates an application, changing its description, tags, plan, or framework information.

shipa app update [-a/--app appname] [--description/-d description] [--plan/-p plan name] [--framework/-k framework] [--team-owner/-t team owner]  [--tag/-g tag]
  • --description sets a description for the application.

  • --plan changes the plan of the application.

  • --framework changes the framework of the application.

  • --team-owner sets owner team for the application.

  • --tag sets a tag for the application. Users can set multiple --tag parameters.

Flags:

Flag

Description

-a, --app

(= "") application name

-d, --description

(= "") application description

-g, --tag

(= []) application tag

-k, --framework

(= "") application framework

-p, --plan

(= "") application plan

-t, --team-owner

(= "") application team owner

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 the Applications link of your Shipa dashboard and then on the specific application, which will open the application details page.

You can find the Move button on the application details page.

The Move option will give you the following options:

From: the current framework bound to the application
To: the new framework that should be bound to the application.

Once you click on Move, Shipa will start the migration process and, if completed successfully, Shipa will then switch the application's endpoint URL to the new framework.

CLI

shipa app move -a <app> -k <newframework>

Flags:

Flag

Description

-a, --app

(= "") application name

-k, --framework

(= "") the framework where the application should be moved 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.

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.

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.

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

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

Application Deploy

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

Dashboard

You can deploy 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.

Inside the application details page, you have the Deploy option.

Clicking on Deploy will give prompt you the following options:

Deployment Type: where you can choose between Public and Private registries. If you select Private, you will see additional options for registry username and password
Registry Image: the image URL where Shipa should pull the image from

CLI

shipa app deploy [-a/--app <appname>] [-i/--image <image_url>] [--build-packs <buildpack names>] [--builder <builder to build source>]  [-m/--message <message>] [-d/--detach] [--steps=<..>] [--step-weight=<..>] [--step-interval=<..>] [--private-image] [-p/--port <app_port>]

You can deploys a docker image from public or private registry or deploy your source code by using Cloud Native Buildpacks. Some examples of calls are:

Flags:

Flag

Description

-a, --app

(= "") application name

--builder

(="heroku/buildpacks:20") Builder to use when deploying source code

--build-packs

(="") A list of comma separated build packs. e.g. pack-1,pack-2

-i, --image

(= "") the image to deploy in application

-m, --message

(= "") message describing this deploy

-d, --detach

(= false) detaches the command execution from your terminal session

--steps

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

--step-weight

(= 1) Canary traffic weight percentage for step. It should be between 0 and 100

--step-interval

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

--private-image

(= false) If the application image is stored in a private registry and requires authentication. You must supply the --private-image flag and the registry credentials.

Private registry credentials consist of a user name and a secret, either a password or an access token. Set the user name and secret with the $SHIPA_REGISTRY_USERNAME and $SHIPA_REGISTRY_PASSWORD environment variables. If not set, you will be prompted by the command line to provide the login credentials.

--port

(= "") Shipa will, by default, use port 8888 to expose your application. If you want to expose your application through a specific port instead, you can use the --port flag

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.

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?