Browse Source

Merge "Add a tripleoclient container"

tags/8.0.0.0b1
Zuul 10 months ago
parent
commit
bbab10815c

+ 40
- 0
docker/tripleoclient/Dockerfile.j2 View File

@@ -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 %}

+ 18
- 0
docker/tripleoclient/create_super_user.sh View File

@@ -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

+ 4
- 0
kolla/common/config.py View File

@@ -779,6 +779,10 @@ SOURCES = {
779 779
         'type': 'url',
780 780
         'location': ('$tarballs_base/tempest/'
781 781
                      'tempest-master.tar.gz')},
782
+    'tripleoclient': {
783
+        'type': 'url',
784
+        'location': ('$tarballs_base/python-tripleoclient/'
785
+                     'tripleoclient-master.tar.gz')},
782 786
     'tripleo-ui': {
783 787
         'type': 'url',
784 788
         'location': ('$tarballs_base/tripleo-ui/'

+ 6
- 0
kolla/image/build.py View File

@@ -96,6 +96,7 @@ SKIPPED_IMAGES = {
96 96
     ],
97 97
     'centos+source': [
98 98
         "ovsdpdk",
99
+        "tripleoclient",
99 100
         # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed
100 101
         # https://bugs.launchpad.net/tripleo/+bug/1744215
101 102
         "tripleo-ui"
@@ -124,6 +125,7 @@ SKIPPED_IMAGES = {
124 125
         "searchlight-base",
125 126
         "solum-base",
126 127
         "tacker-base",
128
+        "tripleoclient",
127 129
         "tripleo-ui",
128 130
         "vitrage-base",
129 131
         "vmtp",
@@ -133,6 +135,7 @@ SKIPPED_IMAGES = {
133 135
     'ubuntu+source': [
134 136
         # There is no qdrouterd package for ubuntu bionic
135 137
         "qdrouterd",
138
+        "tripleoclient",
136 139
         # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed
137 140
         # https://bugs.launchpad.net/tripleo/+bug/1744215
138 141
         "tripleo-ui"
@@ -160,6 +163,7 @@ SKIPPED_IMAGES = {
160 163
         "sensu-base",
161 164
         "solum-base",
162 165
         "tacker-base",
166
+        "tripleoclient",
163 167
         "tripleo-ui",
164 168
         "vitrage-base",
165 169
         "vmtp",
@@ -168,6 +172,7 @@ SKIPPED_IMAGES = {
168 172
     ],
169 173
     'debian+source': [
170 174
         "sensu-base",
175
+        "tripleoclient",
171 176
         "tripleo-ui"
172 177
     ],
173 178
     'oraclelinux+binary': [
@@ -190,6 +195,7 @@ SKIPPED_IMAGES = {
190 195
     'oraclelinux+source': [
191 196
         "bifrost-base",
192 197
         "ovsdpdk",
198
+        "tripleoclient",
193 199
         # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed
194 200
         # https://bugs.launchpad.net/tripleo/+bug/1744215
195 201
         "tripleo-ui"

+ 5
- 0
releasenotes/notes/add-tripleoclient-image-0341fb72fe27ba14.yaml View File

@@ -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.

Loading…
Cancel
Save