CLI Framework Management

As your policy engine for deployment control, frameworks can be managed in 2 different ways today, through a template YAML file or manual individual commands through Shipa's CLI.

Framework Definition

Frameworks allow you to create policies across networking, RBAC, registry control, and more. These policies are then automatically applied to any application deployed using that specific framework.

Users can leverage configuration files to create and update frameworks dynamically through their pipelines or Shipa's CLI.

When using the CLI, configuration files can be used to create frameworks by using the following command:

shipa framework add template.yaml

The command below can be used to update frameworks from the CLI using a template configuration file:

shipa framework update template.yaml

Below is an example of a framework configuration file:

shipaFramework: framework1
      default: true
      public: true
      provisioner: kubernetes
      kubeNamespace: ""
      name: shipa-plan
      disableScan: true
        - busybox
        - bash
        - curl
        - dpkg
        - CVE-xxxx-xxxx
        - CVE-yyyy-yyyy
        - team1
        - team2
        - teamX
        - team3
        - teamN
      - name: volume-1
        teamOwner: team1
        planName: volume-plan1
        capacity: 1G
        accessModes: ReadWriteOnce
        environment: team1
        os: linux
      strict: true
      minReplicas: 1
      maxReplicas: 10
      targetCPUUtilizationPercentage: 50
      disableAppOverride: true
        - "*"
        - "*"
        - label: app
      suffix: ""
        policyMode: allow-all
        customRules: []
        shipaRules: []
        shipaRulesEnabled: []
        policyMode: allow-all
        customRules: []
        shipaRules: []
        shipaRulesEnabled: []
      disableAppPolicies: false
      - amazonec2
      - google
      maxContainer: 0
      maxMemory: 0
      scaleDown: 1.33
      rebalance: true


DefaultWill the framework be the default framework for application deployment(when none is specified during app create, this framework will be used)?
PublicMake the framework public for all teams to consume.
ProvisionerProvisioners are either shipa or kubernetes. If Kubernetes clusters are added to this framework, then kubernetes should be used. Otherwise, it should be used shipa

Shipa nodes and Kubernetes clusters cannot coexist in the same framework.
PlanPlan which will be assigned to all applications when deployed to this framework. The plan should have been previously created through the shipa plan create command.
SecurityWhat type of security scan and exceptions, if any, should be performed/allowed on every application deployed using this framework
AccessWhich teams should have access to the framework, or their access revoked
VolumesVolumes should be created and made available to applications deployed through this framework. Please note that volumes will be created and attached to the framework but will remain available until they are bound to an application
containerPolicyEnforce which docker registry images can be used to deploy applications.
allowedHosts: Array of docker registries
podAutoScalerApplication auto scaling using Kubernetes Horizontal Pod Scaling.
minReplicas: The minimum number of pods to run for the app. Required
maxReplicas: The maximum number of pods to run for the app. Required
targetCPUUtilizationPercentage: The threshold for when to start scaling pods
disableAppOverride: Prevent an app from specifying its own configs for the podAutoScaler. Optional, default true
nodeSelectorsControl app deployment on specific nodes using labels present on the node.
terms: Includes array of node labels as key value pairs
terms.strict: If enabled, all specified labels must be present on a node or an app cannot be deployed to it. Otherwise, only one of the labels must match for an app to be able to be deployed to a node. Optional, default false
domainPolicyPolicy to enforce CNAME of applications.
allowedCnames : array of cnames as strings
ShipaNode/DriversWhich node/cloud providers can be attached to this framework. Please note this is only valid when the provisioner is set to shipa in the Provisioner section.
ShipaNode/AutoScaleNode autoscale rules for Shipa nodes only

Adding Frameworks

To create a framework, users should use the Shipa framework add command, as shown below:

shipa framework add <framework> [-p/--public] [-d/--default] [--provisioner <name>] [-f/--force]

Each Shipa node added using the node-add command, by default, belongs to a framework. When creating new applications, a framework must be chosen, which means that all units of the created application will be spawned in nodes belonging to the chosen framework.


-d, --default(= not set) Marks the framework as the default one(when none is specified during app create, this framework will be used)
-f, --force(= false) Force overwrite default framework
-p, --public(= false) Make framework public (all teams can use it)
--provisioner(= "") Provisioner associated with the framework (empty for default shipa provisioner)
--allowed-cnames(=[])CNames permitted for this framework, e.g. *,another-domain.*
--node-selectors(=[])Key value pairs to be used as node selectors
--planThe resource plan to use when adding app to this framework
--provisionerProvisioner associated to the framework (empty for default kubernetes provisioner) (default "kubernetes")
--registry(=[])Allowed container registries
-s, --strict(=false) Specifies whether all nodeSelectors must be present on a node

Manually Updating Framework Attributes

shipa framework update <framework> [--public=true/false] [--default=true/false] [-f/--force]

Updates attribute for a specific framework.


--default(= not set) Marks the framework as the default one(when none is specified during app creation, this framework will be used)
-f, --force(= false) Force framework to be the default.
--public(= not set) Make framework public (all teams can use it)

Manually Adding Teams to Frameworks

After frameworks are created, users can use Shipa's framework constraint set command to add teams to the frameworks that were just created:

shipa framework constraint set framework1 team team1 team2 --append

shipa framework constraint set framework2 team team3 --append

Listing Frameworks

Listing the available frameworks in Shipa can be done by executing the following:

$ shipa framework list
| Framework  | Kind | Provisioner | Teams      |
| framework1 |      | kubernetes  | shipa-team |
| dev        |      | kubernetes  | dev        |
| prod       |      | kubernetes  | prod       |
| qa         |      | kubernetes  | dev        |

Removing Frameworks

Frameworks can be removed at any time in Shipa. To do so, users can leverage Shipa's framework remove command:

shipa framework remove framework1

Manually Removing Teams from Frameworks

Administrators can remove one or more teams from frameworks using Shipa's framework constraint set command:

shipa framework constraint set framework1 team team1 --blacklist

shipa framework constraint set framework1 team team1 team2 team3 --blacklist