summaryrefslogtreecommitdiffstats
path: root/cloudify/scripts/onap/configure_docker_secret_workaround.py
diff options
context:
space:
mode:
authorMarek Wolczanski <marek.wolczanski@cloudify.co>2017-10-03 14:55:19 +0200
committerMarek Wolczanski <marek.wolczanski@cloudify.co>2017-10-03 15:27:26 +0200
commit63f2cc936ed6e6790f287195694f6d067decdd89 (patch)
treee79b62b7fc3e099708b6707454b4c52ee3e581da /cloudify/scripts/onap/configure_docker_secret_workaround.py
parentb9644b17f8545dedd3ede40f778b33f9b4ecf480 (diff)
Cloudify support for OOM
Issue-ID: OOM-106 Change-Id: Ie0a37ef378fd1907825da181c81502c6fbe9134c Signed-off-by: Marek Wolczanski <marek.wolczanski@cloudify.co>
Diffstat (limited to 'cloudify/scripts/onap/configure_docker_secret_workaround.py')
-rw-r--r--cloudify/scripts/onap/configure_docker_secret_workaround.py40
1 files changed, 0 insertions, 40 deletions
diff --git a/cloudify/scripts/onap/configure_docker_secret_workaround.py b/cloudify/scripts/onap/configure_docker_secret_workaround.py
deleted file mode 100644
index 6e9deff059..0000000000
--- a/cloudify/scripts/onap/configure_docker_secret_workaround.py
+++ /dev/null
@@ -1,40 +0,0 @@
-from fabric.api import run
-
-from cloudify import ctx
-from cloudify.exceptions import NonRecoverableError
-
-
-def _retrieve_namespace():
- namespace = ctx.node.properties.get(
- 'namespace',
- ctx.node.properties
- .get('options', {})
- .get('namespace', None)
- )
-
- if not namespace:
- raise NonRecoverableError(
- 'Namespace is not defined (node={})'.format(ctx.node.name)
- )
-
- return namespace
-
-
-def configure_secret():
- namespace = _retrieve_namespace()
- ctx.logger.info(
- 'Configuring docker secrets for namespace: {0}'.format(namespace)
- )
-
- command = 'kubectl create secret ' \
- 'docker-registry onap-docker-registry-key ' \
- '--docker-server=nexus3.onap.org:10001 ' \
- '--docker-username=docker ' \
- '--docker-password=docker ' \
- '--docker-email=email@email.com ' \
- '--namespace={0}'.format(namespace)
-
- ctx.logger.info('Command "{0}" will be executed'.format(command))
- run(command)
-
- ctx.logger.info('Docker secrets configured successfully')