Skip to content

Latest commit

 

History

History
218 lines (134 loc) · 5.05 KB

guide-use-armada.rst

File metadata and controls

218 lines (134 loc) · 5.05 KB

Armada - Using Armada

Prerequisites

Kubernetes Cluster

Tiller Service

Armada.yaml

Note

Need to have provided a storage system prior(ceph, nfs)

Usage

Note

The apply command performs two main actions: installing and updating define charts in the armada manifest

  1. Pull or Build the Armada Docker Images:
Pull:

docker pull quay.io/attcomdev/armada:latest

Build:

git clone https://github.com/att-comdev/armada && cd armada/
docker build . -t quay.io/attcomdev/armada:latest
  1. Running Armada
    1. docker container

Note

Make sure to mount your kubeconfig into /armada/.kube/config in the container

Note

To run you custom Armada.yamls you need to mount them into the container as shown below. This example is using examples/ directory in armada repo

docker run -d --net host -p 8000:8000 --name armada -v $(pwd)/etc/:/etc/ -v ~/.kube/:/armada/.kube/ -v $(pwd)/examples/:/examples quay.io/attcomdev/armada:latest
docker exec armada armada --help
  1. Helm Install

Note

To install Armada via the Helm chart please make sure to provide an Keysonte endpoint

make charts

helm install <registry>/armada --name armada --namespace armada
  1. Check that tiller is Available
docker exec armada armada tiller --status
  1. If tiller is up then we can start deploying our armada yamls
docker exec armada armada apply /examples/openstack-helm.yaml [ --debug ]
  1. Upgrading charts: modify the armada yaml or chart source code and run armada apply above
docker exec armada armada apply /examples/openstack-helm.yaml [ --debug ]
  1. To check deployed releases:
docker exec armada armada tiller --releases
  1. Testing Releases:
docker exec armada armada test --release=armada-keystone

OR

docker exec armada armada test --file=/examples/openstack-helm.yaml

Overriding Manifest Values

It is possible to override manifest values from the command line using the --set and --values flags. When using the set flag, the document type should be specified first, with the target values following in this manner:

armada apply --set [ document_type ]:[ document_name ]:[ data_value ]=[ value ]

Example:

armada apply --set chart:blog-1:release="new-blog"
armada apply --set chart:blog-1:values.blog.new="welcome"

Note

When overriding values using the set flag, new values will be inserted if they do not exist. An error will only occur if the correct pattern is not used.

There are three types of override types that can be specified: - chart - chart_group - manifest

An example of overriding the location of a chart:

armada apply --set chart:[ chart_name ]:source.location=test [ FILE ]

Example:

armada apply --set chart:blog-1:release=test [ FILE ]

An example of overriding the description of a chart group:

armada apply --set chart_group:[ chart_group_name ]:description=test [ FILE ]

Example:

armada apply examples/simple.yaml --set chart_group:blog-group:description=test

An example of overriding the release prefix of a manifest:

armada apply --set manifest:[ manifest_name ]:release_prefix=[ value ] [ FILE ]

Example:

armada apply example/simple.yaml --set manifest:simple-armada:release_prefix=armada-2

Note

The --set flag can be used multiple times.

It is also possible to override manifest values using values specified in a yaml file using the --values flag. When using the --values flag, a path to the yaml file should be specified in this format:

armada apply --values [ path_to_yaml ] [ FILE ]

Example:

armada apply examples/simple.yaml --values examples/simple-ovr-values.yaml

Note

The --values flag, like the --set flag, can be specified more than once. The --set and --values flag can also be specified at the same time; however, overrides specified by the --set flag take precedence over those specified by the --values flag.

When creating a yaml file of override values, it should be the same as creating an armada manifest overriding documents with the same schema and metadata name for example:

---
schema: armada/Chart/v1
metadata:
  schema: metadata/Document/v1
  name: blog-1
data:
  release: chart-example
  namespace: blog-blog
---
schema: armada/Chart/v1
metadata:
  schema: metadata/Document/v1
  name: blog-2
data:
  release: chart-example-2
  namespace: blog-blog
---
schema: armada/ChartGroup/v1
metadata:
  schema: metadata/Document/v1
  name: blog-group
data:
  description: Change value deploy
  chart_group:
    - blog-1