Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve bootstrap script with nginx single-instance-rpm #5240

Merged
merged 3 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion dist/rpm/openQA.spec
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,10 @@ You only need this package if you have a local postgresql server
next to the webui.

%package single-instance
Summary: Convenience package for a single-instance setup
Summary: Convenience package for a single-instance setup using apache proxy
Group: Development/Tools/Other
Provides: %{name}-single-instance-apache
Provides: %{name}-single-instance-apache2
Requires: %{name}-local-db
Requires: %{name} = %{version}
Requires: %{name}-worker = %{version}
Expand All @@ -249,6 +251,17 @@ Requires: apache2
%description single-instance
Use this package to setup a local instance with all services provided together.

%package single-instance-nginx
Summary: Convenience package for a single-instance setup using nginx proxy
Group: Development/Tools/Other
Requires: %{name}-local-db
Requires: %{name} = %{version}
Requires: %{name}-worker = %{version}
Requires: nginx

%description single-instance-nginx
Use this package to setup a local instance with all services provided together.

%package bootstrap
Summary: Automated openQA setup
Group: Development/Tools/Other
Expand Down
12 changes: 9 additions & 3 deletions script/openqa-bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ fi


# install packages
pkgs=(openQA-single-instance qemu-arm qemu-ppc qemu-x86 qemu-tools sudo iputils os-autoinst-distri-opensuse-deps)
pkgs=(qemu-arm qemu-ppc qemu-x86 qemu-tools sudo iputils os-autoinst-distri-opensuse-deps)

if [ "$(uname -m)" = "aarch64" ]; then
pkgs+=(qemu-uefi-aarch64)
fi
if [[ $setup_web_proxy == "nginx" ]] ; then
pkgs+=(nginx)
pkgs+=(openQA-single-instance-nginx)
else
pkgs+=(openQA-single-instance)
fi

# this was split into a separate package on newer dist versions - so install it if available
Expand All @@ -55,7 +57,11 @@ su postgres -c "/usr/share/openqa/script/setup-db" "$dbuser" "$dbname"
proxy_args=""
[[ -n "$setup_web_proxy" ]] && proxy_args="--proxy=$setup_web_proxy"
setup=/usr/share/openqa/script/configure-web-proxy
(command -v $setup && sh -ex $setup "$proxy_args") || (curl -s https://raw.githubusercontent.com/os-autoinst/openQA/master/script/configure-web-proxy | bash -ex -s -- "$proxy_args")
if command -v $setup ; then
bash -ex $setup "$proxy_args"
else
curl -s https://raw.githubusercontent.com/os-autoinst/openQA/master/script/configure-web-proxy | bash -ex -s -- "$proxy_args"
fi
sed -i -e 's/#*.*method.*=.*$/method = Fake/' /etc/openqa/openqa.ini


Expand Down
Loading