porthole/images/etcdctl-utility
Sergiy Markin 2ddd25489a Fixed swiftclient and updated kubeclient
Added simplejson module for openstack container
command to work with swiftclient

Also bumped all kubectl versions to 1.31.0

Change-Id: I30a160fa8d352f2e0d0c544991159c672b190381
2024-09-19 20:27:25 +00:00
..
Dockerfile.ubuntu_bionic Porthole upgrades 2023-06-23 18:48:26 +00:00
Dockerfile.ubuntu_focal k8s upgrade v1.31.0 2024-08-15 16:47:05 -04:00
Dockerfile.ubuntu_jammy Fixed swiftclient and updated kubeclient 2024-09-19 20:27:25 +00:00
README.md Editorial changes to documentation files 2019-12-16 09:21:19 -06:00

Etcdctl Utility Container

Prerequisites: Deploy Airship in a Bottle (AIAB)

To get started, deploy Airship and OpenStack Helm (OSH). Execute the following in a fresh Ubuntu 16.04 VM having these minimum requirements:

  • 4 vCPU
  • 20 GB RAM
  • 32 GB disk storage
  1. Add the following entries to /etc/sudoers.
        root    ALL=(ALL) NOPASSWD: ALL
        ubuntu  ALL=(ALL) NOPASSWD: ALL
  1. Install the latest versions of Git, CA Certs, and Make if necessary.
        set -xe \
        sudo apt-get update \
        sudo apt-get install --no-install-recommends -y \
        ca-certificates \
        git \
        make \
        jq \
        nmap \
        curl \
        uuid-runtime

Deploy Airship in a Bottle (AIAB)

Deploy Airship in a Bottle (AIAB), which deploys the etcdctl-utility pod.

        sudo -i \
        mkdir -p root/deploy && cd "$_" \
        git clone https://opendev.org/airship/treasuremap \
        cd /root/deploy/treasuremap/tools/deployment/aiab \
        ./airship-in-a-bottle.sh

Usage and Test

Get into the etcdctl-utility pod using kubectl exec. Perform an operation as in the following example.

        kubectl exec -it <POD_NAME> -n utility -- /bin/bash

Example:

        utilscli etcdctl member list
        utilscli etcdctl endpoint health
        utilscli etcdctl endpoint status

        nobody@airship-etcdctl-utility-998b4f4d6-65x6d:/$ utilscli etcdctl member list
        90d1b75fa1b31b89, started, ubuntu, https://10.0.2.15:2380, https://10.0.2.15:2379
        ab1f60375c5ef1d3, started, auxiliary-1, https://10.0.2.15:22380, https://10.0.2.15:22379
        d8ed590018245b3c, started, auxiliary-0, https://10.0.2.15:12380, https://10.0.2.15:12379
        nobody@airship-etcdctl-utility-998b4f4d6-65x6d:/$ utilscli etcdctl endpoint health
        https://kubernetes-etcd.kube-system.svc.cluster.local:2379 is healthy:
        successfully committed proposal: took = 1.787714ms
        nobody@airship-etcdctl-utility-998b4f4d6-65x6d:/$ utilscli etcdctl alarm list
        nobody@airship-etcdctl-utility-998b4f4d6-65x6d:/$ utilscli etcdctl version
        etcdctl version: 3.4.2
        API version: 3.3
        nobody@airship-etcdctl-utility-998b4f4d6-65x6d:/$