Deploy quickly in CI without Ansible

Speed up the deployment during CI runs and avoid the need for lots of
extra packages to run Ansible. This gets us closer to running bare
images for each distro that better simulates a customer environment.

Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
Major Hayden 2020-06-11 08:12:40 -05:00 committed by Major Hayden
parent d607365663
commit 89117ebf3a
4 changed files with 49 additions and 29 deletions

28
schutzbot/deploy.sh Executable file
View file

@ -0,0 +1,28 @@
#!/bin/bash
set -euxo pipefail
# Get OS details.
source /etc/os-release
# Restart systemd to work around some Fedora issues in cloud images.
sudo systemctl restart systemd-journald
# Add osbuild team ssh keys.
cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null
# Set up a dnf repository for the RPMs we built via mock.
sudo cp osbuild-mock.repo /etc/yum.repos.d/osbuild-mock.repo
sudo dnf repository-packages osbuild-mock list
# Install the Image Builder packages.
sudo dnf -y install composer-cli osbuild osbuild-ostree \
osbuild-composer osbuild-composer-rcm osbuild-composer-tests \
osbuild-composer-worker python3-osbuild
# Start services.
sudo systemctl enable --now osbuild-rcm.socket
sudo systemctl enable --now osbuild-composer.socket
# Verify that the API is running.
sudo composer-cli status show
sudo composer-cli sources list