Merge pull request #74 from gardlt/feat/apply/sequenced-group-charts-dep
[Feat] apply/sequenced group charts dep
This commit is contained in:
commit
35249aac88
|
@ -62,8 +62,8 @@ The installation is fairly straight forward:
|
||||||
|
|
||||||
Recomended Enviroment: Ubuntu 16.04
|
Recomended Enviroment: Ubuntu 16.04
|
||||||
|
|
||||||
Installing Dependecies:
|
Installing Dependecies
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
you can run:
|
you can run:
|
||||||
|
|
||||||
|
@ -72,8 +72,8 @@ you can run:
|
||||||
|
|
||||||
NOTE: If you want to use virtualenv please refer to `pygit2`_
|
NOTE: If you want to use virtualenv please refer to `pygit2`_
|
||||||
|
|
||||||
Installing armada:
|
Installing armada
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
``sudo pip install -e .``
|
``sudo pip install -e .``
|
||||||
|
|
||||||
|
|
|
@ -75,12 +75,13 @@ class Armada(object):
|
||||||
return chart, values
|
return chart, values
|
||||||
|
|
||||||
def pre_flight_checks(self):
|
def pre_flight_checks(self):
|
||||||
for ch in self.config['armada']['charts']:
|
for group in self.config.get('armada').get('charts'):
|
||||||
location = ch.get('chart').get('source').get('location')
|
for ch in group.get('chart_group'):
|
||||||
ct_type = ch.get('chart').get('source').get('type')
|
location = ch.get('chart').get('source').get('location')
|
||||||
|
ct_type = ch.get('chart').get('source').get('type')
|
||||||
|
|
||||||
if ct_type == 'git' and not git.check_available_repo(location):
|
if ct_type == 'git' and not git.check_available_repo(location):
|
||||||
raise ValueError(str("Invalid Url Path: " + location))
|
raise ValueError(str("Invalid Url Path: " + location))
|
||||||
|
|
||||||
if not self.tiller.tiller_status():
|
if not self.tiller.tiller_status():
|
||||||
raise Exception("Tiller Services is not Available")
|
raise Exception("Tiller Services is not Available")
|
||||||
|
@ -93,6 +94,8 @@ class Armada(object):
|
||||||
Syncronize Helm with the Armada Config(s)
|
Syncronize Helm with the Armada Config(s)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# TODO: (gardlt) we need to break up this func into
|
||||||
|
# a more cleaner format
|
||||||
# extract known charts on tiller right now
|
# extract known charts on tiller right now
|
||||||
if not self.skip_pre_flight:
|
if not self.skip_pre_flight:
|
||||||
LOG.info("Performing Pre-Flight Checks")
|
LOG.info("Performing Pre-Flight Checks")
|
||||||
|
@ -109,96 +112,104 @@ class Armada(object):
|
||||||
|
|
||||||
for entry in self.config['armada']['charts']:
|
for entry in self.config['armada']['charts']:
|
||||||
|
|
||||||
chart = dotify(entry['chart'])
|
desc = entry.get('description', 'A Chart Group')
|
||||||
values = entry.get('chart').get('values', {})
|
chart_group = entry.get('chart_group', [])
|
||||||
pre_actions = {}
|
|
||||||
post_actions = {}
|
|
||||||
|
|
||||||
if chart.release_name is None:
|
if entry.get('sequenced', False):
|
||||||
continue
|
self.wait = True
|
||||||
|
|
||||||
# retrieve appropriate timeout value if 'wait' is specified
|
LOG.info('Deploying: %s', desc)
|
||||||
chart_timeout = None
|
|
||||||
if self.wait:
|
|
||||||
if self.timeout:
|
|
||||||
chart_timeout = self.timeout
|
|
||||||
elif getattr(chart, 'timeout', None):
|
|
||||||
chart_timeout = chart.timeout
|
|
||||||
|
|
||||||
# initialize helm chart and request a
|
for gchart in chart_group:
|
||||||
# protoc helm chart object which will
|
chart = dotify(gchart['chart'])
|
||||||
# pull the sources down and walk the
|
values = gchart.get('chart').get('values', {})
|
||||||
# dependencies
|
pre_actions = {}
|
||||||
chartbuilder = ChartBuilder(chart)
|
post_actions = {}
|
||||||
protoc_chart = chartbuilder.get_helm_chart()
|
LOG.info('%s', chart.release_name)
|
||||||
|
|
||||||
# determine install or upgrade by examining known releases
|
if chart.release_name is None:
|
||||||
LOG.debug("RELEASE: %s", chart.release_name)
|
|
||||||
|
|
||||||
if release_prefix(prefix, chart.release_name) in [x[0]
|
|
||||||
for x in
|
|
||||||
known_releases]:
|
|
||||||
|
|
||||||
# indicate to the end user what path we are taking
|
|
||||||
LOG.info("Upgrading release %s", chart.release_name)
|
|
||||||
# extract the installed chart and installed values from the
|
|
||||||
# latest release so we can compare to the intended state
|
|
||||||
installed_chart, installed_values = self.find_release_chart(
|
|
||||||
known_releases, release_prefix(prefix, chart.release_name))
|
|
||||||
|
|
||||||
LOG.info("Checking Pre/Post Actions")
|
|
||||||
upgrade = entry.get('chart', {}).get('upgrade', False)
|
|
||||||
if upgrade:
|
|
||||||
if not self.disable_update_pre and upgrade.get('pre',
|
|
||||||
False):
|
|
||||||
pre_actions = getattr(chart.upgrade, 'pre', {})
|
|
||||||
|
|
||||||
if not self.disable_update_post and upgrade.get('post',
|
|
||||||
False):
|
|
||||||
LOG.info("Checking Post Actions")
|
|
||||||
post_actions = getattr(chart.upgrade, 'post', {})
|
|
||||||
|
|
||||||
# show delta for both the chart templates and the chart values
|
|
||||||
# TODO(alanmeadows) account for .files differences
|
|
||||||
# once we support those
|
|
||||||
|
|
||||||
upgrade_diff = self.show_diff(chart, installed_chart,
|
|
||||||
installed_values,
|
|
||||||
chartbuilder.dump(), values)
|
|
||||||
|
|
||||||
if not upgrade_diff:
|
|
||||||
LOG.info("There are no updates found in this chart")
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# do actual update
|
# retrieve appropriate timeout value if 'wait' is specified
|
||||||
self.tiller.update_release(protoc_chart,
|
chart_timeout = None
|
||||||
self.dry_run,
|
if self.wait:
|
||||||
chart.release_name,
|
if getattr(chart, 'timeout', None):
|
||||||
chart.namespace,
|
chart_timeout = chart.timeout
|
||||||
prefix, pre_actions,
|
else:
|
||||||
post_actions,
|
chart_timeout = self.timeout
|
||||||
disable_hooks=chart.
|
|
||||||
upgrade.no_hooks,
|
|
||||||
values=yaml.safe_dump(values),
|
|
||||||
wait=self.wait,
|
|
||||||
timeout=chart_timeout)
|
|
||||||
|
|
||||||
# process install
|
chartbuilder = ChartBuilder(chart)
|
||||||
else:
|
protoc_chart = chartbuilder.get_helm_chart()
|
||||||
LOG.info("Installing release %s", chart.release_name)
|
|
||||||
self.tiller.install_release(protoc_chart,
|
|
||||||
self.dry_run,
|
|
||||||
chart.release_name,
|
|
||||||
chart.namespace,
|
|
||||||
prefix,
|
|
||||||
values=yaml.safe_dump(values),
|
|
||||||
wait=self.wait,
|
|
||||||
timeout=chart_timeout)
|
|
||||||
|
|
||||||
LOG.debug("Cleaning up chart source in %s",
|
# determine install or upgrade by examining known releases
|
||||||
chartbuilder.source_directory)
|
LOG.debug("RELEASE: %s", chart.release_name)
|
||||||
|
deployed_releases = [x[0] for x in known_releases]
|
||||||
|
prefix_chart = release_prefix(prefix, chart.release_name)
|
||||||
|
|
||||||
chartbuilder.source_cleanup()
|
if prefix_chart in deployed_releases:
|
||||||
|
|
||||||
|
# indicate to the end user what path we are taking
|
||||||
|
LOG.info("Upgrading release %s", chart.release_name)
|
||||||
|
# extract the installed chart and installed values from the
|
||||||
|
# latest release so we can compare to the intended state
|
||||||
|
LOG.info("Checking Pre/Post Actions")
|
||||||
|
apply_chart, apply_values = self.find_release_chart(
|
||||||
|
known_releases, prefix_chart)
|
||||||
|
|
||||||
|
LOG.info("Checking Pre/Post Actions")
|
||||||
|
upgrade = gchart.get('chart', {}).get('upgrade', False)
|
||||||
|
|
||||||
|
if upgrade:
|
||||||
|
if not self.disable_update_pre and upgrade.get('pre',
|
||||||
|
False):
|
||||||
|
pre_actions = getattr(chart.upgrade, 'pre', {})
|
||||||
|
|
||||||
|
if not self.disable_update_post and upgrade.get('post',
|
||||||
|
False):
|
||||||
|
post_actions = getattr(chart.upgrade, 'post', {})
|
||||||
|
|
||||||
|
# show delta for both the chart templates and the chart
|
||||||
|
# values
|
||||||
|
# TODO(alanmeadows) account for .files differences
|
||||||
|
# once we support those
|
||||||
|
|
||||||
|
upgrade_diff = self.show_diff(chart, apply_chart,
|
||||||
|
apply_values,
|
||||||
|
chartbuilder.dump(), values)
|
||||||
|
|
||||||
|
if not upgrade_diff:
|
||||||
|
LOG.info("There are no updates found in this chart")
|
||||||
|
continue
|
||||||
|
|
||||||
|
# do actual update
|
||||||
|
self.tiller.update_release(protoc_chart,
|
||||||
|
self.dry_run,
|
||||||
|
chart.release_name,
|
||||||
|
chart.namespace,
|
||||||
|
prefix, pre_actions,
|
||||||
|
post_actions,
|
||||||
|
disable_hooks=chart.
|
||||||
|
upgrade.no_hooks,
|
||||||
|
values=yaml.safe_dump(values),
|
||||||
|
wait=self.wait,
|
||||||
|
timeout=chart_timeout)
|
||||||
|
|
||||||
|
# process install
|
||||||
|
else:
|
||||||
|
LOG.info("Installing release %s", chart.release_name)
|
||||||
|
self.tiller.install_release(protoc_chart,
|
||||||
|
self.dry_run,
|
||||||
|
chart.release_name,
|
||||||
|
chart.namespace,
|
||||||
|
prefix,
|
||||||
|
values=yaml.safe_dump(values),
|
||||||
|
wait=self.wait,
|
||||||
|
timeout=chart_timeout)
|
||||||
|
|
||||||
|
LOG.debug("Cleaning up chart source in %s",
|
||||||
|
chartbuilder.source_directory)
|
||||||
|
|
||||||
|
chartbuilder.source_cleanup()
|
||||||
|
|
||||||
if self.enable_chart_cleanup:
|
if self.enable_chart_cleanup:
|
||||||
self.tiller.chart_cleanup(prefix, self.config['armada']['charts'])
|
self.tiller.chart_cleanup(prefix, self.config['armada']['charts'])
|
||||||
|
|
|
@ -10,38 +10,37 @@ from armada.handlers.armada import Armada
|
||||||
|
|
||||||
class ArmadaTestCase(unittest.TestCase):
|
class ArmadaTestCase(unittest.TestCase):
|
||||||
test_yaml = """
|
test_yaml = """
|
||||||
endpoints: &endpoints
|
|
||||||
hello-world:
|
|
||||||
this: is an example
|
|
||||||
|
|
||||||
armada:
|
armada:
|
||||||
release_prefix: armada
|
release_prefix: armada
|
||||||
charts:
|
charts:
|
||||||
- chart:
|
- description: this is a test
|
||||||
name: test_chart_1
|
sequenced: False
|
||||||
release_name: test_chart_1
|
chart_group:
|
||||||
namespace: test
|
- chart:
|
||||||
values: {}
|
name: test_chart_1
|
||||||
source:
|
release_name: test_chart_1
|
||||||
type: null
|
namespace: test
|
||||||
location: null
|
values: {}
|
||||||
subpath: null
|
source:
|
||||||
reference: null
|
type: null
|
||||||
dependencies: []
|
location: null
|
||||||
timeout: 50
|
subpath: null
|
||||||
|
reference: null
|
||||||
|
dependencies: []
|
||||||
|
timeout: 50
|
||||||
|
|
||||||
- chart:
|
- chart:
|
||||||
name: test_chart_2
|
name: test_chart_2
|
||||||
release_name: test_chart_2
|
release_name: test_chart_2
|
||||||
namespace: test
|
namespace: test
|
||||||
values: {}
|
values: {}
|
||||||
source:
|
source:
|
||||||
type: null
|
type: null
|
||||||
location: null
|
location: null
|
||||||
subpath: null
|
subpath: null
|
||||||
reference: null
|
reference: null
|
||||||
dependencies: []
|
dependencies: []
|
||||||
timeout: 5
|
timeout: 5
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@mock.patch('armada.handlers.armada.ChartBuilder')
|
@mock.patch('armada.handlers.armada.ChartBuilder')
|
||||||
|
@ -57,8 +56,9 @@ class ArmadaTestCase(unittest.TestCase):
|
||||||
armada.tiller = mock_tiller
|
armada.tiller = mock_tiller
|
||||||
armada.config = yaml.load(self.test_yaml)
|
armada.config = yaml.load(self.test_yaml)
|
||||||
|
|
||||||
chart_1 = armada.config['armada']['charts'][0]['chart']
|
charts = armada.config['armada']['charts'][0]['chart_group']
|
||||||
chart_2 = armada.config['armada']['charts'][1]['chart']
|
chart_1 = charts[0]['chart']
|
||||||
|
chart_2 = charts[1]['chart']
|
||||||
|
|
||||||
# mock irrelevant methods called by armada.sync()
|
# mock irrelevant methods called by armada.sync()
|
||||||
mock_tiller.list_charts.return_value = []
|
mock_tiller.list_charts.return_value = []
|
||||||
|
|
|
@ -24,10 +24,11 @@ class LintTestCase(unittest.TestCase):
|
||||||
armada:
|
armada:
|
||||||
release_prefix: armada-test
|
release_prefix: armada-test
|
||||||
charts:
|
charts:
|
||||||
- chart:
|
- chart_group:
|
||||||
name: chart
|
- chart:
|
||||||
release_name: chart
|
name: chart
|
||||||
namespace: chart
|
release_name: chart
|
||||||
|
namespace: chart
|
||||||
""")
|
""")
|
||||||
resp = lint.valid_manifest(config)
|
resp = lint.valid_manifest(config)
|
||||||
self.assertTrue(resp)
|
self.assertTrue(resp)
|
||||||
|
@ -37,10 +38,11 @@ class LintTestCase(unittest.TestCase):
|
||||||
armasda:
|
armasda:
|
||||||
release_prefix: armada-test
|
release_prefix: armada-test
|
||||||
charts:
|
charts:
|
||||||
- chart:
|
- chart_group:
|
||||||
name: chart
|
- chart:
|
||||||
release_name: chart
|
name: chart
|
||||||
namespace: chart
|
release_name: chart
|
||||||
|
namespace: chart
|
||||||
""")
|
""")
|
||||||
|
|
||||||
with self.assertRaises(Exception):
|
with self.assertRaises(Exception):
|
||||||
|
@ -51,10 +53,11 @@ class LintTestCase(unittest.TestCase):
|
||||||
armada:
|
armada:
|
||||||
release: armada-test
|
release: armada-test
|
||||||
charts:
|
charts:
|
||||||
- chart:
|
- chart_group:
|
||||||
name: chart
|
- chart:
|
||||||
release_name: chart
|
name: chart
|
||||||
namespace: chart
|
release_name: chart
|
||||||
|
namespace: chart
|
||||||
""")
|
""")
|
||||||
|
|
||||||
with self.assertRaises(Exception):
|
with self.assertRaises(Exception):
|
||||||
|
@ -62,13 +65,14 @@ class LintTestCase(unittest.TestCase):
|
||||||
|
|
||||||
def test_lint_armada_removed(self):
|
def test_lint_armada_removed(self):
|
||||||
config = yaml.load("""
|
config = yaml.load("""
|
||||||
armasda:
|
sarmada:
|
||||||
release_prefix: armada-test
|
release_prefix: armada-test
|
||||||
chart:
|
charts:
|
||||||
- chart:
|
- chart_group:
|
||||||
name: chart
|
- chart:
|
||||||
release_name: chart
|
name: chart
|
||||||
namespace: chart
|
release_name: chart
|
||||||
|
namespace: chart
|
||||||
""")
|
""")
|
||||||
|
|
||||||
with self.assertRaises(Exception):
|
with self.assertRaises(Exception):
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
|
# Copyright 2017 The Armada Authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
ARMADA_DEFINITION = 'armada'
|
ARMADA_DEFINITION = 'armada'
|
||||||
RELEASE_PREFIX = 'release_prefix'
|
RELEASE_PREFIX = 'release_prefix'
|
||||||
|
@ -5,7 +18,7 @@ CHARTS_DEFINITION = 'charts'
|
||||||
|
|
||||||
|
|
||||||
def valid_manifest(config):
|
def valid_manifest(config):
|
||||||
if not (isinstance(config.get(ARMADA_DEFINITION, None), dict)):
|
if not isinstance(config.get(ARMADA_DEFINITION, None), dict):
|
||||||
raise Exception("Did not declare armada object")
|
raise Exception("Did not declare armada object")
|
||||||
|
|
||||||
armada_config = config.get('armada')
|
armada_config = config.get('armada')
|
||||||
|
@ -16,8 +29,9 @@ def valid_manifest(config):
|
||||||
if not isinstance(armada_config.get(CHARTS_DEFINITION), list):
|
if not isinstance(armada_config.get(CHARTS_DEFINITION), list):
|
||||||
raise Exception('Check yaml invalid chart definition must be array')
|
raise Exception('Check yaml invalid chart definition must be array')
|
||||||
|
|
||||||
for chart in armada_config.get('charts', []):
|
for group in armada_config.get('charts'):
|
||||||
if not isinstance(chart.get('chart').get('name'), basestring):
|
for chart in group.get('chart_group'):
|
||||||
raise Exception('Chart name needs to be a string')
|
if not isinstance(chart.get('chart').get('name'), basestring):
|
||||||
|
raise Exception('Chart name needs to be a string')
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -7,7 +7,7 @@ Docker
|
||||||
|
|
||||||
To use the docker containter to develop:
|
To use the docker containter to develop:
|
||||||
|
|
||||||
1. Fork the [repo](http://github.com/att-comdev/armada)
|
1. Fork the `Repository <http://github.com/att-comdev/armada>`_
|
||||||
2. Clone the forked repo
|
2. Clone the forked repo
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
@ -15,8 +15,11 @@ To use the docker containter to develop:
|
||||||
cd armada
|
cd armada
|
||||||
export repo="https://github.com/<forked-repo>/armada.git"
|
export repo="https://github.com/<forked-repo>/armada.git"
|
||||||
export branch="<branch>"
|
export branch="<branch>"
|
||||||
|
|
||||||
docker build . -t quay.io/attcomdev/armada:latest --build-arg REPO=$repo --build-arg VERSION=$branch
|
docker build . -t quay.io/attcomdev/armada:latest --build-arg REPO=$repo --build-arg VERSION=$branch
|
||||||
|
|
||||||
|
docker run -d --name armada -v ~/.kube/config:/root/.kube/config -v $(pwd)/examples/:/examples quay.io/attcomdev/armada:latest
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The first build will take a little while. Afterwards the it will much faster
|
The first build will take a little while. Afterwards the it will much faster
|
||||||
|
@ -30,31 +33,7 @@ To use VirtualEnv we will need to add some extra steps
|
||||||
|
|
||||||
1. virtualenv venv
|
1. virtualenv venv
|
||||||
2. source ./venv/bin/activate
|
2. source ./venv/bin/activate
|
||||||
3. export LIBGIT2=$VIRTUAL_ENV
|
3. sudo sh ./tools/libgit2.sh
|
||||||
4. run modified bash below
|
|
||||||
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Ubuntu 16.04 Install only
|
|
||||||
|
|
||||||
sudo apt install git cmake make -y
|
|
||||||
sudo apt-get install -y python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libssh2-1 libgit2-dev python-pip libgit2-24
|
|
||||||
sudo apt-get install -y pkg-config libssh2-1-dev libhttp-parser-dev libssl-dev libz-dev
|
|
||||||
|
|
||||||
LIBGIT_VERSION='0.25.0'
|
|
||||||
|
|
||||||
wget https://github.com/libgit2/libgit2/archive/v${LIBGIT_VERSION}.tar.gz
|
|
||||||
tar xzf v${LIBGIT_VERSION}.tar.gz
|
|
||||||
cd libgit2-${LIBGIT_VERSION}/
|
|
||||||
cmake . -DCMAKE_INSTALL_PREFIX=$LIBGIT2
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
export LDFLAGS="-Wl,-rpath='$LIBGIT2/lib',--enable-new-dtags $LDFLAGS"
|
|
||||||
sudo pip install pygit2==${LIBGIT_VERSION}
|
|
||||||
sudo ldconfig
|
|
||||||
|
|
||||||
Test that it worked with:
|
Test that it worked with:
|
||||||
|
|
||||||
|
@ -65,7 +44,7 @@ Test that it worked with:
|
||||||
From the directory of the forked repository:
|
From the directory of the forked repository:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
pip install -r test-requirements.txt
|
pip install -r test-requirements.txt
|
||||||
|
|
||||||
|
@ -76,10 +55,12 @@ Your env is now ready to go! :)
|
||||||
Kubernetes
|
Kubernetes
|
||||||
##########
|
##########
|
||||||
|
|
||||||
To test your armada fixes/features you will need to set-up a Kubernetes cluster. We recommend:
|
To test your armada fixes/features you will need to set-up a Kubernetes cluster.
|
||||||
|
|
||||||
`Minikube <https://github.com/kubernetes/minikube#installation>`_
|
We recommend:
|
||||||
|
|
||||||
`Halcyon <https://github.com/att-comdev/halcyon-vagrant-kubernetes>`_
|
`Kubeadm <https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/>`_
|
||||||
|
|
||||||
|
`Kubeadm-aio <https://github.com/openstack/openstack-helm/tree/master/tools/kubeadm-aio>`_
|
||||||
|
|
||||||
.. note:: When using Halcyon it will not generate a config file. Run the following commands to create one: `get_k8s_creds.sh <https://github.com/att-comdev/halcyon-vagrant-kubernetes#accessing-the-cluster>`_
|
.. note:: When using Halcyon it will not generate a config file. Run the following commands to create one: `get_k8s_creds.sh <https://github.com/att-comdev/halcyon-vagrant-kubernetes#accessing-the-cluster>`_
|
||||||
|
|
|
@ -56,6 +56,19 @@ Behavior
|
||||||
Chart Keywords
|
Chart Keywords
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Chart Group
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
+-----------------+----------+------------------------------------------------------------------------+
|
||||||
|
| keyword | type | action |
|
||||||
|
+=================+==========+========================================================================+
|
||||||
|
| description | string | description of chart set |
|
||||||
|
+-----------------+----------+------------------------------------------------------------------------+
|
||||||
|
| charts_group | array | stores definiton of the charts in a group |
|
||||||
|
+-----------------+----------+------------------------------------------------------------------------+
|
||||||
|
| sequenced | bool | enables sequeced chart deployment in a group |
|
||||||
|
+-----------------+----------+------------------------------------------------------------------------+
|
||||||
|
|
||||||
Chart
|
Chart
|
||||||
^^^^^
|
^^^^^
|
||||||
|
|
||||||
|
@ -108,21 +121,24 @@ Simple Example
|
||||||
armada:
|
armada:
|
||||||
release_prefix: "my_armada"
|
release_prefix: "my_armada"
|
||||||
charts:
|
charts:
|
||||||
- chart: &cockroach
|
- description: I am a chart group
|
||||||
name: cockroach
|
sequenced: False
|
||||||
release_name: cockroach
|
chart_group:
|
||||||
namespace: db
|
- chart: &cockroach
|
||||||
timeout: 20
|
name: cockroach
|
||||||
install:
|
release_name: cockroach
|
||||||
no_hooks: false
|
namespace: db
|
||||||
values:
|
timeout: 20
|
||||||
Replicas: 1
|
install:
|
||||||
source:
|
no_hooks: false
|
||||||
type: git
|
values:
|
||||||
location: git://github.com/kubernetes/charts/
|
Replicas: 1
|
||||||
subpath: stable/cockroachdb
|
source:
|
||||||
reference: master
|
type: git
|
||||||
dependencies: []
|
location: git://github.com/kubernetes/charts/
|
||||||
|
subpath: stable/cockroachdb
|
||||||
|
reference: master
|
||||||
|
dependencies: []
|
||||||
|
|
||||||
Multichart Example
|
Multichart Example
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -132,35 +148,57 @@ Multichart Example
|
||||||
armada:
|
armada:
|
||||||
release_prefix: "my_armada"
|
release_prefix: "my_armada"
|
||||||
charts:
|
charts:
|
||||||
- chart: &common
|
- description: I am group 1
|
||||||
name: common
|
sequenced: True
|
||||||
release_name: null
|
chart_group:
|
||||||
namespace: null
|
- chart: &common
|
||||||
timeout: None
|
name: common
|
||||||
values: {}
|
release_name: common
|
||||||
source:
|
namespace: db
|
||||||
type: git
|
timeout: 20
|
||||||
location: git://github.com/kubernetes/charts/
|
install:
|
||||||
subpath: common
|
no_hooks: false
|
||||||
reference: master
|
values:
|
||||||
dependencies: []
|
Replicas: 1
|
||||||
|
source:
|
||||||
- chart: &cockroach
|
type: git
|
||||||
name: cockroach
|
location: git://github.com/kubernetes/charts/
|
||||||
release_name: cockroach
|
subpath: stable/common
|
||||||
namespace: db
|
reference: master
|
||||||
timeout: 100
|
dependencies: []
|
||||||
install:
|
- chart: &cockroach
|
||||||
no_hooks: false
|
name: cockroach
|
||||||
values:
|
release_name: cockroach
|
||||||
Replicas: 1
|
namespace: db
|
||||||
source:
|
timeout: 20
|
||||||
type: git
|
install:
|
||||||
location: git://github.com/kubernetes/charts/
|
no_hooks: false
|
||||||
subpath: stable/cockroachdb
|
values:
|
||||||
reference: master
|
Replicas: 1
|
||||||
dependencies:
|
source:
|
||||||
- *common
|
type: git
|
||||||
|
location: git://github.com/kubernetes/charts/
|
||||||
|
subpath: stable/cockroachdb
|
||||||
|
reference: master
|
||||||
|
dependencies: []
|
||||||
|
- description: I am group 2
|
||||||
|
sequenced: False
|
||||||
|
chart_group:
|
||||||
|
- chart: &mariadb
|
||||||
|
name: mariadb
|
||||||
|
release_name: mariadb
|
||||||
|
namespace: db
|
||||||
|
timeout: 20
|
||||||
|
install:
|
||||||
|
no_hooks: false
|
||||||
|
values:
|
||||||
|
Replicas: 1
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
location: git://github.com/kubernetes/charts/
|
||||||
|
subpath: stable/mariadb
|
||||||
|
reference: master
|
||||||
|
dependencies: []
|
||||||
|
|
||||||
References
|
References
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
|
@ -1,182 +1,144 @@
|
||||||
endpoints: &endpoints
|
|
||||||
hello-world:
|
|
||||||
this: is an example
|
|
||||||
|
|
||||||
armada:
|
armada:
|
||||||
|
|
||||||
# results in "armada-keystone" release name below
|
|
||||||
# to avoid manipulating releases managed directtly
|
|
||||||
# with helm or other armadas
|
|
||||||
release_prefix: armada
|
release_prefix: armada
|
||||||
|
|
||||||
charts:
|
charts:
|
||||||
|
- description: Generate Bootstrap keys
|
||||||
# silent dependency
|
sequenced: True
|
||||||
- chart: &helm-toolkit
|
chart_group:
|
||||||
name: helm-toolkit
|
- chart: &helm-toolkit
|
||||||
release_name: null
|
name: helm-toolkit
|
||||||
namespace: null
|
release_name: null
|
||||||
values: {}
|
namespace: null
|
||||||
source:
|
values: {}
|
||||||
type: git
|
source:
|
||||||
location: git://github.com/openstack/openstack-helm
|
type: git
|
||||||
subpath: helm-toolkit
|
location: git://github.com/openstack/openstack-helm
|
||||||
reference: master
|
subpath: helm-toolkit
|
||||||
dependencies: []
|
reference: master
|
||||||
|
dependencies: []
|
||||||
- chart: &mariadb
|
- chart: &bootstrap-openstack
|
||||||
name: mariadb
|
name: bootstrap-openstack
|
||||||
release_name: mariadb
|
release_name: openstack
|
||||||
namespace: openstack
|
namespace: openstack
|
||||||
timeout: 50
|
values: {}
|
||||||
install:
|
source:
|
||||||
no_hooks: false
|
type: local
|
||||||
upgrade:
|
location: /home/ubuntu/openstack-helm
|
||||||
no_hooks: false
|
subpath: bootstrap
|
||||||
pre:
|
reference: master
|
||||||
delete: []
|
dependencies: []
|
||||||
create: []
|
- chart: &mariadb
|
||||||
post:
|
name: mariadb
|
||||||
delete: []
|
release_name: mariadb
|
||||||
create: []
|
namespace: openstack
|
||||||
values:
|
timeout: 50
|
||||||
endpoints: *endpoints
|
install:
|
||||||
replicas: 1
|
no_hooks: false
|
||||||
volume:
|
upgrade:
|
||||||
size: 1Gi
|
no_hooks: false
|
||||||
source:
|
values: {}
|
||||||
type: git
|
source:
|
||||||
location: git://github.com/openstack/openstack-helm
|
type: git
|
||||||
subpath: mariadb
|
location: git://github.com/openstack/openstack-helm
|
||||||
reference: master
|
subpath: mariadb
|
||||||
dependencies:
|
reference: master
|
||||||
|
dependencies:
|
||||||
|
- *helm-toolkit
|
||||||
|
- description: Undercloud Services add-ons
|
||||||
|
sequenced: False
|
||||||
|
chart_group:
|
||||||
|
- chart: &memcached
|
||||||
|
name: memcached
|
||||||
|
release_name: memcached
|
||||||
|
namespace: openstack
|
||||||
|
timeout: 10
|
||||||
|
install:
|
||||||
|
no_hooks: false
|
||||||
|
upgrade:
|
||||||
|
no_hooks: false
|
||||||
|
values: {}
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
location: git://github.com/openstack/openstack-helm
|
||||||
|
subpath: memcached
|
||||||
|
reference: master
|
||||||
|
dependencies:
|
||||||
|
- *helm-toolkit
|
||||||
|
- chart: &etcd
|
||||||
|
name: etcd
|
||||||
|
release_name: etcd
|
||||||
|
namespace: openstack
|
||||||
|
timeout: 10
|
||||||
|
install:
|
||||||
|
no_hooks: false
|
||||||
|
upgrade:
|
||||||
|
no_hooks: false
|
||||||
|
values: {}
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
location: git://github.com/openstack/openstack-helm
|
||||||
|
subpath: etcd
|
||||||
|
reference: master
|
||||||
|
dependencies:
|
||||||
|
- *helm-toolkit
|
||||||
|
- chart: &rabbitmq
|
||||||
|
name: rabbitmq
|
||||||
|
release_name: rabbitmq
|
||||||
|
namespace: openstack
|
||||||
|
timeout: 10
|
||||||
|
install:
|
||||||
|
no_hooks: false
|
||||||
|
upgrade:
|
||||||
|
no_hooks: false
|
||||||
|
values:
|
||||||
|
replicas: 1
|
||||||
|
source:
|
||||||
|
type: git
|
||||||
|
location: git://github.com/openstack/openstack-helm
|
||||||
|
subpath: rabbitmq
|
||||||
|
reference: master
|
||||||
|
dependencies:
|
||||||
- *helm-toolkit
|
- *helm-toolkit
|
||||||
|
|
||||||
- chart: &memcached
|
- description: Openstack Services
|
||||||
name: memcached
|
sequenced: false
|
||||||
release_name: memcached
|
chart_group:
|
||||||
namespace: openstack
|
- chart: &keystone
|
||||||
timeout: 10
|
name: keystone
|
||||||
install:
|
release_name: keystone
|
||||||
no_hooks: false
|
namespace: openstack
|
||||||
upgrade:
|
timeout: 20
|
||||||
no_hooks: false
|
install:
|
||||||
pre:
|
no_hooks: false
|
||||||
delete: []
|
upgrade:
|
||||||
create: []
|
no_hooks: false
|
||||||
post:
|
pre:
|
||||||
delete: []
|
|
||||||
create: []
|
|
||||||
values:
|
|
||||||
endpoints: *endpoints
|
|
||||||
source:
|
|
||||||
type: git
|
|
||||||
location: git://github.com/openstack/openstack-helm
|
|
||||||
subpath: memcached
|
|
||||||
reference: master
|
|
||||||
dependencies:
|
|
||||||
- *helm-toolkit
|
|
||||||
|
|
||||||
- chart: &etcd
|
|
||||||
name: etcd
|
|
||||||
release_name: etcd
|
|
||||||
namespace: openstack
|
|
||||||
timeout: 10
|
|
||||||
install:
|
|
||||||
no_hooks: false
|
|
||||||
upgrade:
|
|
||||||
no_hooks: false
|
|
||||||
pre:
|
|
||||||
delete: []
|
|
||||||
create: []
|
|
||||||
post:
|
|
||||||
delete: []
|
|
||||||
create: []
|
|
||||||
values:
|
|
||||||
endpoints: *endpoints
|
|
||||||
source:
|
|
||||||
type: git
|
|
||||||
location: git://github.com/openstack/openstack-helm
|
|
||||||
subpath: etcd
|
|
||||||
reference: master
|
|
||||||
dependencies:
|
|
||||||
- *helm-toolkit
|
|
||||||
|
|
||||||
- chart: &rabbitmq
|
|
||||||
name: rabbitmq
|
|
||||||
release_name: rabbitmq
|
|
||||||
namespace: openstack
|
|
||||||
timeout: 10
|
|
||||||
install:
|
|
||||||
no_hooks: false
|
|
||||||
upgrade:
|
|
||||||
no_hooks: false
|
|
||||||
pre:
|
|
||||||
delete: []
|
|
||||||
create: []
|
|
||||||
post:
|
|
||||||
delete: []
|
|
||||||
create: []
|
|
||||||
values:
|
|
||||||
endpoints: *endpoints
|
|
||||||
replicas: 1
|
|
||||||
source:
|
|
||||||
type: git
|
|
||||||
location: git://github.com/openstack/openstack-helm
|
|
||||||
subpath: rabbitmq
|
|
||||||
reference: master
|
|
||||||
dependencies:
|
|
||||||
- *helm-toolkit
|
|
||||||
|
|
||||||
- chart: &keystone
|
|
||||||
name: keystone
|
|
||||||
release_name: keystone
|
|
||||||
namespace: openstack
|
|
||||||
timeout: 20
|
|
||||||
install:
|
|
||||||
no_hooks: false
|
|
||||||
upgrade:
|
|
||||||
no_hooks: false
|
|
||||||
post:
|
|
||||||
delete: []
|
|
||||||
create: []
|
|
||||||
pre:
|
|
||||||
delete:
|
delete:
|
||||||
- name: keystone-db-sync
|
- name: keystone-db-sync
|
||||||
type: job
|
type: job
|
||||||
- name: keystone-db-init
|
- name: keystone-db-init
|
||||||
type: job
|
type: job
|
||||||
values:
|
values: {}
|
||||||
endpoints: *endpoints
|
source:
|
||||||
source:
|
type: git
|
||||||
type: git
|
location: git://github.com/openstack/openstack-helm
|
||||||
location: git://github.com/openstack/openstack-helm
|
subpath: keystone
|
||||||
subpath: keystone
|
reference: master
|
||||||
reference: master
|
dependencies:
|
||||||
dependencies:
|
|
||||||
- *helm-toolkit
|
- *helm-toolkit
|
||||||
|
- chart: &horizon
|
||||||
- chart: &horizon
|
name: horizon
|
||||||
name: horizon
|
release_name: horizon
|
||||||
release_name: horizon
|
namespace: openstack
|
||||||
namespace: openstack
|
timeout: 10
|
||||||
timeout: 10
|
install:
|
||||||
install:
|
no_hooks: false
|
||||||
no_hooks: false
|
upgrade:
|
||||||
upgrade:
|
no_hooks: false
|
||||||
no_hooks: false
|
values: {}
|
||||||
pre:
|
source:
|
||||||
delete: []
|
type: git
|
||||||
create: []
|
location: git://github.com/openstack/openstack-helm
|
||||||
post:
|
subpath: horizon
|
||||||
delete: []
|
reference: master
|
||||||
create: []
|
dependencies:
|
||||||
values:
|
|
||||||
endpoints: *endpoints
|
|
||||||
source:
|
|
||||||
type: git
|
|
||||||
location: git://github.com/openstack/openstack-helm
|
|
||||||
subpath: horizon
|
|
||||||
reference: master
|
|
||||||
dependencies:
|
|
||||||
- *helm-toolkit
|
- *helm-toolkit
|
||||||
|
|
Loading…
Reference in New Issue