Merge "Add a tripleoclient container"

This commit is contained in:
Zuul 2018-09-10 10:32:17 +00:00 committed by Gerrit Code Review
commit bbab10815c
5 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,40 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block tripleoclient_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set tripleoclient_packages = [
'python-ipaddr',
'python-openstackclient',
'python-tripleoclient',
'puppet-tripleo',
'openstack-tripleo-validations',
'e2fsprogs',
'xfsprogs',
'openssh-clients',
'git'
] %}
{{ macros.install_packages(tripleoclient_packages | customizable("packages")) }}
{% else %}
RUN echo 'tripleoclient not yet available for {{ base_distro }}' && /bin/false
{% endif %}
{% elif install_type == 'source' %}
RUN echo 'tripleoclient not yet available for {{ base_distro }} source installs' && /bin/false
{% endif %}
COPY create_super_user.sh /usr/local/bin/create_super_user.sh
RUN chmod 750 /usr/local/bin/create_super_user.sh
{% block tripleoclient_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -0,0 +1,18 @@
#!/bin/bash
# This is a useful entrypoint/cmd if you wish to run commands in a container
# in an existing users $HOME directory
# 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
if [ -n "$USER" -a -n "$UID" ]; then
useradd "$USER" -u "$UID" -M
cat >> /etc/sudoers <<EOF_CAT
$USER ALL=(ALL) NOPASSWD:ALL
EOF_CAT
su -l $USER
export TERM="xterm"
alias ls='ls --color=auto'
/bin/bash
else
echo "Please set valid $USER and $UID env variables."
exit 1
fi

View File

@ -779,6 +779,10 @@ SOURCES = {
'type': 'url', 'type': 'url',
'location': ('$tarballs_base/tempest/' 'location': ('$tarballs_base/tempest/'
'tempest-master.tar.gz')}, 'tempest-master.tar.gz')},
'tripleoclient': {
'type': 'url',
'location': ('$tarballs_base/python-tripleoclient/'
'tripleoclient-master.tar.gz')},
'tripleo-ui': { 'tripleo-ui': {
'type': 'url', 'type': 'url',
'location': ('$tarballs_base/tripleo-ui/' 'location': ('$tarballs_base/tripleo-ui/'

View File

@ -96,6 +96,7 @@ SKIPPED_IMAGES = {
], ],
'centos+source': [ 'centos+source': [
"ovsdpdk", "ovsdpdk",
"tripleoclient",
# TODO(jeffrey4l): remove tripleo-ui when following bug is fixed # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed
# https://bugs.launchpad.net/tripleo/+bug/1744215 # https://bugs.launchpad.net/tripleo/+bug/1744215
"tripleo-ui" "tripleo-ui"
@ -124,6 +125,7 @@ SKIPPED_IMAGES = {
"searchlight-base", "searchlight-base",
"solum-base", "solum-base",
"tacker-base", "tacker-base",
"tripleoclient",
"tripleo-ui", "tripleo-ui",
"vitrage-base", "vitrage-base",
"vmtp", "vmtp",
@ -133,6 +135,7 @@ SKIPPED_IMAGES = {
'ubuntu+source': [ 'ubuntu+source': [
# There is no qdrouterd package for ubuntu bionic # There is no qdrouterd package for ubuntu bionic
"qdrouterd", "qdrouterd",
"tripleoclient",
# TODO(jeffrey4l): remove tripleo-ui when following bug is fixed # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed
# https://bugs.launchpad.net/tripleo/+bug/1744215 # https://bugs.launchpad.net/tripleo/+bug/1744215
"tripleo-ui" "tripleo-ui"
@ -160,6 +163,7 @@ SKIPPED_IMAGES = {
"sensu-base", "sensu-base",
"solum-base", "solum-base",
"tacker-base", "tacker-base",
"tripleoclient",
"tripleo-ui", "tripleo-ui",
"vitrage-base", "vitrage-base",
"vmtp", "vmtp",
@ -168,6 +172,7 @@ SKIPPED_IMAGES = {
], ],
'debian+source': [ 'debian+source': [
"sensu-base", "sensu-base",
"tripleoclient",
"tripleo-ui" "tripleo-ui"
], ],
'oraclelinux+binary': [ 'oraclelinux+binary': [
@ -190,6 +195,7 @@ SKIPPED_IMAGES = {
'oraclelinux+source': [ 'oraclelinux+source': [
"bifrost-base", "bifrost-base",
"ovsdpdk", "ovsdpdk",
"tripleoclient",
# TODO(jeffrey4l): remove tripleo-ui when following bug is fixed # TODO(jeffrey4l): remove tripleo-ui when following bug is fixed
# https://bugs.launchpad.net/tripleo/+bug/1744215 # https://bugs.launchpad.net/tripleo/+bug/1744215
"tripleo-ui" "tripleo-ui"

View File

@ -0,0 +1,5 @@
---
features:
- Add tripleoclient image. This image can be used interactively for ad-hoc
tripleoclient commands or automated to output Ansible playbooks from
TripleO Heat Templates for TripleO deployment.