Merge "[WIP] Change source of compute-utility images"

This commit is contained in:
Zuul 2019-10-14 21:34:29 +00:00 committed by Gerrit Code Review
commit b7d00a795d
5 changed files with 92 additions and 131 deletions

View File

@ -1,121 +0,0 @@
Compute Utility Container
-----------------
Prerequisites: Deploy OSH-AIO
Installation
------------
1. Add the below to /etc/sudoers
root ALL=(ALL) NOPASSWD: ALL
ubuntu ALL=(ALL) NOPASSWD: ALL
2. Install the latest versions of Git, CA Certs & Make if necessary
#!/bin/bash
set -xe
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
ca-certificates \
git \
make \
jq \
nmap \
curl \
uuid-runtime
3. Proxy Configuration
Add the address of the Kubernetes API, 172.17.0.1, and .svc.cluster.local to your no_proxy and NO_PROXY environment variables.
export no_proxy=${no_proxy},172.17.0.1,.svc.cluster.local
export NO_PROXY=${NO_PROXY},172.17.0.1,.svc.cluster.local
4. Clone the OpenStack-Helm Repos
git clone https://git.openstack.org/openstack/openstack-helm-infra.git
git clone https://git.openstack.org/openstack/openstack-helm.git
In order to deploy OpenStack-Helm behind corporate proxy servers, add the following entries to openstack-helm-infra/tools/gate/devel/local-vars.yaml.
proxy:
http: http://username:password@host:port
https: https://username:password@host:port
noproxy: 127.0.0.1,localhost,172.17.0.1,.svc.cluster.local
5. Deploy Kubernetes & Helm
cd openstack-helm
./tools/deployment/developer/common/010-deploy-k8s.sh
6. Install OpenStack-Helm
Setup Clients on the host and assemble the charts
./tools/deployment/developer/common/020-setup-client.sh
Deploy the ingress controller
./tools/deployment/developer/common/030-ingress.sh
7. Deploy Ceph
./tools/deployment/developer/ceph/040-ceph.sh
Activate the namespace to be able to use Ceph
./tools/deployment/developer/ceph/045-ceph-ns-activate.sh
8. Deploy Keystone
./tools/deployment/developer/ceph/080-keystone.sh
9. Deploy Heat
./tools/deployment/developer/ceph/090-heat.sh
10. Deploy Horizon
./tools/deployment/developer/ceph/100-horizon.sh
11. Deploy Glance
./tools/deployment/developer/ceph/120-glance.sh
12. Deploy Cinder
./tools/deployment/developer/ceph/130-cinder.sh
13. Deploy LibVirt # required if you want to test compute-utility functionality
./tools/deployment/developer/ceph/150-libvirt.sh
14. Deploy Compute Kit (Nova and Neutron)
./tools/deployment/developer/ceph/160-compute-kit.sh
15. To run further commands from the CLI manually, execute the following to set up authentication credentials
export OS_CLOUD=openstack_helm
16. Clone the Porthole and compute utility repo as well.
git clone https://review.opendev.org/airship/porthole
cd porthole
./install_compute_utility.sh
Usage
-----
Get in to the utility pod using kubectl exec. To perform any operation use the below example.
kubectl exec -it <POD_NAME> -n utility /bin/bash
Run the utilscli with commands formatted: utilscli <client-name> <server-hostname> <command> <options>
example:
utilscli libvirt-client mtn16r001c002 virsh list
Accepted client-names are:
libvirt-client
ovs-client
ipmi-client
perccli-client
numa-client
sos-client
Commands for each client vary with the client.

View File

@ -1,6 +1,20 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Default values for compute-utility.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Declare name/value pairs to be passed into your templates.
# name: value
@ -13,10 +27,8 @@ release_uuid: null
images:
pull_policy: IfNotPresent
tags:
#compute_utility: 'quay.io/attcomdev/compute-utility:latest'
compute_utility: 'docker.io/mhmiddleton/mhmuc:compute-utility_v0.0.1'
#image_repo_sync: docker.io/docker:17.07.0
compute_utility: 'quay.io/airshipit/porthole-compute-utility:latest-ubuntu_xenial'
image_repo_sync: docker.io/docker:18.09.02
local_registry:
active: false
exclude:

View File

@ -1,19 +1,45 @@
ARG FROM=docker.io/ubuntu:xenial
FROM ${FROM}
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode' \
org.opencontainers.image.url='https://airshipit.org' \
org.opencontainers.image.documentation='https://opendev.org/airship/porthole' \
org.opencontainers.image.source='https://opendev.org/airship/porthole' \
org.opencontainers.image.vendor='The Airship Authors' \
org.opencontainers.image.licenses='Apache-2.0'
ARG KUBE_VERSION=1.12.2
RUN set -xe \
&& sed -i '/nobody/d' /etc/passwd \
&& echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/bash" >> /etc/passwd \
&& apt-get update && apt-get dist-upgrade -y \
&& apt-get install -y wget curl apt-transport-https ca-certificates gnupg\
&& apt-get update && apt-get install -y bash python-oslo.rootwrap moreutils vim sudo screen radosgw rsyslog hexedit jq s3cmd rsync xz-utils iperf \
&& apt-get remove --purge -y wget apt-transport-https && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* \
&& apt-get update \
&& apt-get install -y apt-transport-https \
bash \
ca-certificates \
curl \
gnupg \
hexedit \
iperf \
jq \
moreutils \
python-oslo.rootwrap \
radosgw \
rsyslog \
s3cmd \
rsync \
sudo \
wget \
xz-utils \
&& apt-get remove --purge -y wget apt-transport-https \
&& apt-get autoremove -y \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& TMP_DIR=$(mktemp --directory) \
&& cd ${TMP_DIR} \
&& curl -sSL https://dl.k8s.io/v${KUBE_VERSION}/kubernetes-client-linux-amd64.tar.gz | tar -zxv --strip-components=1 \
&& curl -sSLO https://dl.k8s.io/v${KUBE_VERSION}/kubernetes-client-linux-amd64.tar.gz \
&& tar --strip-components=1 -zxvf kubernetes-client-linux-amd64.tar.gz \
&& mv ${TMP_DIR}/client/bin/kubectl /usr/bin/kubectl \
&& chmod +x /usr/bin/kubectl \
&& rm -rf ${TMP_DIR}
CMD ["/bin/bash"]

View File

@ -18,6 +18,7 @@
- airship-porthole-linter
- airship-porthole-images-build-gate-calicoctl-utility
- airship-porthole-images-build-gate-ceph-utility
- airship-porthole-images-build-gate-compute-utility
- airship-porthole-images-build-gate-etcdctl-utility
- airship-porthole-images-build-gate-mysqlclient-utility
- airship-porthole-images-build-gate-openstack-utility
@ -27,6 +28,7 @@
- airship-porthole-linter
- airship-porthole-images-build-gate-calicoctl-utility
- airship-porthole-images-build-gate-ceph-utility
- airship-porthole-images-build-gate-compute-utility
- airship-porthole-images-build-gate-etcdctl-utility
- airship-porthole-images-build-gate-mysqlclient-utility
- airship-porthole-images-build-gate-openstack-utility
@ -36,6 +38,7 @@
jobs:
- airship-porthole-images-publish-calicoctl-utility
- airship-porthole-images-publish-ceph-utility
- airship-porthole-images-publish-compute-utility
- airship-porthole-images-publish-etcdctl-utility
- airship-porthole-images-publish-mysqlclient-utility
- airship-porthole-images-publish-openstack-utility

View File

@ -0,0 +1,41 @@
# Copyright 2019 AT&T Intellectual Property. All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- job:
name: airship-porthole-images-build-gate-compute-utility
parent: &parent airship-porthole-images
vars:
image_name: &image_name porthole-compute-utility
distro_suffix: &distro_suffix ubuntu_xenial
files:
- ^charts/compute-utility/.*$
- ^images/compute-utility/.*$
- ^Makefile$
- ^tools/.*$
- ^zuul.d/.*$
- job:
name: airship-porthole-images-publish-compute-utility
parent: *parent
secrets:
- name: quay_credentials
secret: quay_credentials
pass-to-parent: true
vars:
image_name: *image_name
distro_suffix: *distro_suffix
publish: true
tags:
dynamic:
commit: true