diff options
author | Zuul <zuul@review.openstack.org> | 2018-09-10 10:32:17 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-09-10 10:32:17 +0000 |
commit | bbab10815ceb23993aa29a1743bfe2b3cbd87f6e (patch) | |
tree | 60808e277e64e1704d8de848efa5e8c3969bfc4d | |
parent | 451d0fc023c9a167364cfa15cead808f74d9ac67 (diff) | |
parent | e1b37f5444bae2400490917b697a18b03c90cace (diff) |
Merge "Add a tripleoclient container"
-rw-r--r-- | docker/tripleoclient/Dockerfile.j2 | 40 | ||||
-rw-r--r-- | docker/tripleoclient/create_super_user.sh | 18 | ||||
-rwxr-xr-x | kolla/common/config.py | 4 | ||||
-rwxr-xr-x | kolla/image/build.py | 6 | ||||
-rw-r--r-- | releasenotes/notes/add-tripleoclient-image-0341fb72fe27ba14.yaml | 5 |
5 files changed, 73 insertions, 0 deletions
diff --git a/docker/tripleoclient/Dockerfile.j2 b/docker/tripleoclient/Dockerfile.j2 new file mode 100644 index 0000000..37d8def --- /dev/null +++ b/docker/tripleoclient/Dockerfile.j2 | |||
@@ -0,0 +1,40 @@ | |||
1 | FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} | ||
2 | LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" | ||
3 | |||
4 | {% block tripleoclient_header %}{% endblock %} | ||
5 | |||
6 | {% import "macros.j2" as macros with context %} | ||
7 | |||
8 | {% if install_type == 'binary' %} | ||
9 | {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} | ||
10 | |||
11 | {% set tripleoclient_packages = [ | ||
12 | 'python-ipaddr', | ||
13 | 'python-openstackclient', | ||
14 | 'python-tripleoclient', | ||
15 | 'puppet-tripleo', | ||
16 | 'openstack-tripleo-validations', | ||
17 | 'e2fsprogs', | ||
18 | 'xfsprogs', | ||
19 | 'openssh-clients', | ||
20 | 'git' | ||
21 | ] %} | ||
22 | |||
23 | {{ macros.install_packages(tripleoclient_packages | customizable("packages")) }} | ||
24 | |||
25 | {% else %} | ||
26 | RUN echo 'tripleoclient not yet available for {{ base_distro }}' && /bin/false | ||
27 | {% endif %} | ||
28 | |||
29 | {% elif install_type == 'source' %} | ||
30 | |||
31 | |||
32 | RUN echo 'tripleoclient not yet available for {{ base_distro }} source installs' && /bin/false | ||
33 | |||
34 | {% endif %} | ||
35 | |||
36 | COPY create_super_user.sh /usr/local/bin/create_super_user.sh | ||
37 | RUN chmod 750 /usr/local/bin/create_super_user.sh | ||
38 | |||
39 | {% block tripleoclient_footer %}{% endblock %} | ||
40 | {% block footer %}{% endblock %} | ||
diff --git a/docker/tripleoclient/create_super_user.sh b/docker/tripleoclient/create_super_user.sh new file mode 100644 index 0000000..37c8bf1 --- /dev/null +++ b/docker/tripleoclient/create_super_user.sh | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/bash | ||
2 | # This is a useful entrypoint/cmd if you wish to run commands in a container | ||
3 | # in an existing users $HOME directory | ||
4 | # For example: docker run -ti -e USER=stack -e UID=1000 --privileged=true --volume=/home/stack/:/home/stack/ tripleoclient:latest /usr/local/bin/create_super_user.sh | ||
5 | |||
6 | if [ -n "$USER" -a -n "$UID" ]; then | ||
7 | useradd "$USER" -u "$UID" -M | ||
8 | cat >> /etc/sudoers <<EOF_CAT | ||
9 | $USER ALL=(ALL) NOPASSWD:ALL | ||
10 | EOF_CAT | ||
11 | su -l $USER | ||
12 | export TERM="xterm" | ||
13 | alias ls='ls --color=auto' | ||
14 | /bin/bash | ||
15 | else | ||
16 | echo "Please set valid $USER and $UID env variables." | ||
17 | exit 1 | ||
18 | fi | ||
diff --git a/kolla/common/config.py b/kolla/common/config.py index ee4fbd2..a6bdbc0 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py | |||
@@ -779,6 +779,10 @@ SOURCES = { | |||
779 | 'type': 'url', | 779 | 'type': 'url', |
780 | 'location': ('$tarballs_base/tempest/' | 780 | 'location': ('$tarballs_base/tempest/' |
781 | 'tempest-master.tar.gz')}, | 781 | 'tempest-master.tar.gz')}, |
782 | 'tripleoclient': { | ||
783 | 'type': 'url', | ||
784 | 'location': ('$tarballs_base/python-tripleoclient/' | ||
785 | 'tripleoclient-master.tar.gz')}, | ||
782 | 'tripleo-ui': { | 786 | 'tripleo-ui': { |
783 | 'type': 'url', | 787 | 'type': 'url', |
784 | 'location': ('$tarballs_base/tripleo-ui/' | 788 | 'location': ('$tarballs_base/tripleo-ui/' |
diff --git a/kolla/image/build.py b/kolla/image/build.py index c974be9..f588484 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py | |||
@@ -96,6 +96,7 @@ SKIPPED_IMAGES = { | |||
96 | ], | 96 | ], |
97 | 'centos+source': [ | 97 | 'centos+source': [ |
98 | "ovsdpdk", | 98 | "ovsdpdk", |
99 | "tripleoclient", | ||
99 | # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed | 100 | # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed |
100 | # https://bugs.launchpad.net/tripleo/+bug/1744215 | 101 | # https://bugs.launchpad.net/tripleo/+bug/1744215 |
101 | "tripleo-ui" | 102 | "tripleo-ui" |
@@ -124,6 +125,7 @@ SKIPPED_IMAGES = { | |||
124 | "searchlight-base", | 125 | "searchlight-base", |
125 | "solum-base", | 126 | "solum-base", |
126 | "tacker-base", | 127 | "tacker-base", |
128 | "tripleoclient", | ||
127 | "tripleo-ui", | 129 | "tripleo-ui", |
128 | "vitrage-base", | 130 | "vitrage-base", |
129 | "vmtp", | 131 | "vmtp", |
@@ -133,6 +135,7 @@ SKIPPED_IMAGES = { | |||
133 | 'ubuntu+source': [ | 135 | 'ubuntu+source': [ |
134 | # There is no qdrouterd package for ubuntu bionic | 136 | # There is no qdrouterd package for ubuntu bionic |
135 | "qdrouterd", | 137 | "qdrouterd", |
138 | "tripleoclient", | ||
136 | # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed | 139 | # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed |
137 | # https://bugs.launchpad.net/tripleo/+bug/1744215 | 140 | # https://bugs.launchpad.net/tripleo/+bug/1744215 |
138 | "tripleo-ui" | 141 | "tripleo-ui" |
@@ -160,6 +163,7 @@ SKIPPED_IMAGES = { | |||
160 | "sensu-base", | 163 | "sensu-base", |
161 | "solum-base", | 164 | "solum-base", |
162 | "tacker-base", | 165 | "tacker-base", |
166 | "tripleoclient", | ||
163 | "tripleo-ui", | 167 | "tripleo-ui", |
164 | "vitrage-base", | 168 | "vitrage-base", |
165 | "vmtp", | 169 | "vmtp", |
@@ -168,6 +172,7 @@ SKIPPED_IMAGES = { | |||
168 | ], | 172 | ], |
169 | 'debian+source': [ | 173 | 'debian+source': [ |
170 | "sensu-base", | 174 | "sensu-base", |
175 | "tripleoclient", | ||
171 | "tripleo-ui" | 176 | "tripleo-ui" |
172 | ], | 177 | ], |
173 | 'oraclelinux+binary': [ | 178 | 'oraclelinux+binary': [ |
@@ -190,6 +195,7 @@ SKIPPED_IMAGES = { | |||
190 | 'oraclelinux+source': [ | 195 | 'oraclelinux+source': [ |
191 | "bifrost-base", | 196 | "bifrost-base", |
192 | "ovsdpdk", | 197 | "ovsdpdk", |
198 | "tripleoclient", | ||
193 | # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed | 199 | # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed |
194 | # https://bugs.launchpad.net/tripleo/+bug/1744215 | 200 | # https://bugs.launchpad.net/tripleo/+bug/1744215 |
195 | "tripleo-ui" | 201 | "tripleo-ui" |
diff --git a/releasenotes/notes/add-tripleoclient-image-0341fb72fe27ba14.yaml b/releasenotes/notes/add-tripleoclient-image-0341fb72fe27ba14.yaml new file mode 100644 index 0000000..5033c4c --- /dev/null +++ b/releasenotes/notes/add-tripleoclient-image-0341fb72fe27ba14.yaml | |||
@@ -0,0 +1,5 @@ | |||
1 | --- | ||
2 | features: | ||
3 | - Add tripleoclient image. This image can be used interactively for ad-hoc | ||
4 | tripleoclient commands or automated to output Ansible playbooks from | ||
5 | TripleO Heat Templates for TripleO deployment. | ||