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.
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 resources: general: setup: default: true public: true provisioner: kubernetes kubeNamespace: "" plan: name: shipa-plan security: disableScan: true ignoreComponents: - busybox - bash - curl - dpkg ignoreCVES: - CVE-xxxx-xxxx - CVE-yyyy-yyyy access: append: - team1 - team2 - teamX blacklist: - team3 - teamN volumes: - name: volume-1 teamOwner: team1 planName: volume-plan1 capacity: 1G accessModes: ReadWriteOnce containerPolicy: allowedHosts: - docker.io nodeSelectors: terms: environment: team1 os: linux strict: true podAutoScaler: minReplicas: 1 maxReplicas: 10 targetCPUUtilizationPercentage: 50 disableAppOverride: true domainPolicy: allowedCnames: - "*.example.com" - "*.acme.bar" appAutoDiscovery: appSelector: - label: app suffix: "" networkPolicy: ingress: policyMode: allow-all customRules:  shipaRules:  shipaRulesEnabled:  egress: policyMode: allow-all customRules:  shipaRules:  shipaRulesEnabled:  disableAppPolicies: false shipaNode: drivers: - amazonec2 - google autoScale: maxContainer: 0 maxMemory: 0 scaleDown: 1.33 rebalance: true
Will the framework be the default framework for application deployment(when none is specified during app create, this framework will be used)?
Make the framework public for all teams to consume.
Provisioners 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.
Plan 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.
What type of security scan and exceptions, if any, should be performed/allowed on every application deployed using this framework
Which teams should have access to the framework, or their access revoked
Volumes 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
Enforce which docker registry images can be used to deploy applications.
Application auto scaling using Kubernetes Horizontal Pod Scaling.
Control app deployment on specific nodes using labels present on the node.
Policy to enforce CNAME of applications.
Which 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.
Node autoscale rules for Shipa nodes only
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.
(= not set) Marks the framework as the default one(when none is specified during app create, this framework will be used)
(= false) Force overwrite default framework
(= false) Make framework public (all teams can use it)
(= "") Provisioner associated with the framework (empty for default shipa provisioner)
(=)CNames permitted for this framework, e.g.
(=)Key value pairs to be used as node selectors
The resource plan to use when adding app to this framework
Provisioner associated to the framework (empty for default kubernetes provisioner) (default "kubernetes")
(=)Allowed container registries
(=false) Specifies whether all nodeSelectors must be present on a node
shipa framework update <framework> [--public=true/false] [--default=true/false] [-f/--force]
Updates attribute for a specific framework.
(= not set) Marks the framework as the default one(when none is specified during app creation, this framework will be used)
(= false) Force framework to be the default.
(= not set) Make framework public (all teams can use it)
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 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 | +------------+------+-------------+------------+
Frameworks can be removed at any time in Shipa. To do so, users can leverage Shipa's framework remove command:
shipa framework remove framework1
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
Updated 3 months ago