Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/activate' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
jovial committed Nov 25, 2022
2 parents 0bf6477 + 8ac76ce commit 9ba253a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
ansible_connection: local
kolla_ansible_target_venv: "{{ lookup('env', 'KAYOBE_CONFIG_PATH') }}/../../../../venvs/kolla-ansible/"
ansible_python_interpreter: /usr/bin/python3
# Downloading IPA images is slow and the are not checked. Setting this
# true, means that we will use the dummy IPA images that are created
# in the config-diff script.
ipa_build_images: true
{% endraw %}
4 changes: 2 additions & 2 deletions docker/kayobe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN dnf install epel-release -y && \
dnf install -y gcc git vim python3-pyyaml python3-virtualenv \
libffi-devel sudo which openssh-server e2fsprogs rsync \
diffstat diffutils debootstrap procps-ng gdisk util-linux \
dosfstools lvm2 kpartx systemd-udev && \
dosfstools lvm2 kpartx systemd-udev bash-completion && \
dnf clean all

# Configure lvm not to use udev for device discovery. This allows you to use
Expand Down Expand Up @@ -74,7 +74,7 @@ COPY --chown=stack:stack $KAYOBE_DOCKER_SSH_CONFIG_PATH /stack/.ssh/config
RUN chmod 600 /stack/.ssh/config

# Copy custom binaries into image. The wildcard worksaround the check on the parent directory existing.
COPY .automation/docker/kayobe/bin/kayobe-automation-workaround-missing .automation.conf/docker*/kayobe/bin/* /usr/local/bin
COPY .automation/utils/kayobe-automation-activate .automation.conf/docker*/kayobe/bin/* /usr/local/bin

# Control host bootsrap without leaving kayobe-config in the image
RUN --mount=type=ssh,uid=1000 --mount=type=tmpfs,target=/tmp/src --mount=type=bind,source=.,target=/src sudo cp -rfp /src /tmp/ && \
Expand Down
14 changes: 14 additions & 0 deletions utils/kayobe-automation-activate
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

source ~/kayobe-automation-env/venvs/kayobe/bin/activate
source ~/kayobe-automation-env/src/kayobe-config/kayobe-env
source <(kayobe complete)

cd ~/kayobe-automation-env/src/kayobe-config

exec bash --rcfile <(
cat ~/.bashrc
kayobe complete
echo PS1="'[\W] (kayobe-automation)$ '"
echo HISTCONTROL=ignorespace
)

0 comments on commit 9ba253a

Please sign in to comment.