From 27b61887798fbfb88f293b4778633f969829d3ac Mon Sep 17 00:00:00 2001 From: Ian Main Date: Thu, 9 Feb 2017 16:23:59 -0500 Subject: Write out a json file containing container startup info and create tool to use it. This adds a bit to the post.yaml for docker to write out a json file containing all the information on how we are start docker containers (thanks Dan!). I've then written a script that parses this that can be used to execute docker run commands in various ways for debugging purposes. Change-Id: I36d66b42d1ac5030db8841820d4fc512a71d1285 Co-Authored-by: Dan Prince --- docker/post.j2.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docker/post.j2.yaml') diff --git a/docker/post.j2.yaml b/docker/post.j2.yaml index 3473f4ca..ef839667 100644 --- a/docker/post.j2.yaml +++ b/docker/post.j2.yaml @@ -187,6 +187,24 @@ resources: docker_config: {get_param: [role_data, {{role.name}}, docker_config]} docker_image: {get_param: [role_data, {{role.name}}, docker_image]} + # Here we are dumping all the docker container startup configuration data + # so that we can have access to how they are started outside of heat + # and docker-cmd. This lets us create command line tools to start and + # test these containers. + {{role.name}}DockerConfigJsonStartupData: + type: OS::Heat::StructuredConfig + properties: + group: json-file + config: + /var/lib/docker-container-startup-configs.json: + {get_attr: [{{role.name}}DockerConfig, value]} + + {{role.name}}DockerConfigJsonStartupDataDeployment: + type: OS::Heat::SoftwareDeploymentGroup + properties: + config: {get_resource: {{role.name}}DockerConfigJsonStartupData} + servers: {get_param: [servers, {{role.name}}]} + {{role.name}}KollaJsonConfig: type: OS::Heat::StructuredConfig properties: -- cgit 1.2.3-korg