Skip to content

Commit

Permalink
Build OpenStack Watcher Container
Browse files Browse the repository at this point in the history
This pull request:
* Builds OpenStack Watcher containers
* Add python-watcherclient package to openstackclient container
* Add openstack-watcher-ui package to horizon container

Note: python-watcherclient and openstack-watcher-ui is not available in
downstream currently. It is available in CentOS Stream with RDO antelope
release. That's why we have added these packages under tcib_distro
conditional to avoid breakage downstream.

Jira: https://issues.redhat.com/browse/OSPRH-11085
Co-authored-by: Alfredo Moralejo <amoralej@redhat.com>
Signed-off-by: Chandan Kumar <raukadah@gmail.com>
  • Loading branch information
raukadah and amoralej committed Nov 4, 2024
1 parent 32df348 commit 84602e0
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 0 deletions.
3 changes: 3 additions & 0 deletions container-images/containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ container_images:
- imagename: quay.io/podified-master-centos9/openstack-tempest-extras:current-podified
- imagename: quay.io/podified-master-centos9/openstack-tobiko:current-podified
- imagename: quay.io/podified-master-centos9/openstack-openstackclient:current-podified
- imagename: quay.io/podified-master-centos9/openstack-watcher-api:current-podified
- imagename: quay.io/podified-master-centos9/openstack-watcher-applier:current-podified
- imagename: quay.io/podified-master-centos9/openstack-watcher-decision-engine:current-podified
1 change: 1 addition & 0 deletions container-images/kolla/base/uid_gid_manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ _SUPPORTED_USERS['tempest']='tempest 42480 42480 /var/lib/tempest kolla'
_SUPPORTED_USERS['tobiko']='tobiko 42495 42495 /var/lib/tobiko kolla'
_SUPPORTED_USERS['tss']='tss 59 59'
_SUPPORTED_USERS['ansible']='ansible 227 227 /var/lib/ansible kolla'
_SUPPORTED_USERS['watcher']='watcher 42451 42451 /var/lib/watcher kolla'

for _USER_TO_CREATE in $_USERS_TO_CREATE; do
# Initialize computed args
Expand Down
13 changes: 13 additions & 0 deletions container-images/kolla/horizon/extend_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ function config_octavia_dashboard {
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/_1482_project_load_balancer_panel.py"
}

function config_watcher_dashboard {
for file in ${SITE_PACKAGES}/watcher_dashboard/local/enabled/_*[^__].py; do
config_dashboard "${ENABLE_WATCHER}" \
"${SITE_PACKAGES}/watcher_dashboard/local/enabled/${file##*/}" \
"${SITE_PACKAGES}/openstack_dashboard/local/enabled/${file##*/}"
done

config_dashboard "${ENABLE_WATCHER}" \
"${SITE_PACKAGES}/watcher_dashboard/conf/watcher_policy.json" \
"/etc/openstack-dashboard/watcher_policy.json"
}

# Regenerate the compressed javascript and css if any configuration files have
# changed. Use a static modification date when generating the tarball
# so that we only trigger on content changes.
Expand All @@ -105,6 +117,7 @@ config_heat_dashboard
config_ironic_dashboard
config_manila_ui
config_octavia_dashboard
config_watcher_dashboard

if settings_changed; then
${MANAGE_PY} collectstatic --noinput --clear
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
tcib_actions:
- run: rm -rf /home/cloud-admin && bash /usr/local/bin/uid_gid_manage {{ tcib_user }}
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
# Note(chandankumar): Remove it once python3-watcherclient is available downstream
- run: >-
if [ '{{ tcib_distro }}' == 'centos' ];then dnf -y install python3-watcherclient && dnf clean all && rm -rf /var/cache/dnf; fi
- run: openstack complete | tee /etc/bash_completion.d/osc.bash_completion > /dev/null
- run: baremetal complete | tee /etc/bash_completion.d/baremetal.bash_completion > /dev/null
# ensure "oc rsh" uses bash by default
Expand Down
3 changes: 3 additions & 0 deletions container-images/tcib/base/os/horizon/horizon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ tcib_actions:
mv /tmp/macros.image-language-conf /etc/rpm &&
dnf -y install {{ tcib_packages.common | join(' ') }} &&
dnf clean all && rm -rf /var/cache/dnf
# Note(chandankumar): Remove it once openstack-watcher-ui package is available downstream.
- run: >-
if [ '{{ tcib_distro }}' == 'centos' ];then dnf -y install openstack-watcher-ui && dnf clean all && rm -rf /var/cache/dnf; fi
- run: cp /usr/share/tcib/container-images/kolla/horizon/extend_start.sh /usr/local/bin/kolla_extend_start
- run: chmod 755 /usr/local/bin/kolla_extend_start
- run: >-
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tcib_actions:
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
- run: sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
tcib_packages:
common:
- openstack-watcher-api
- httpd
- mod_ssl
- python3-mod_wsgi
tcib_user: watcher
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tcib_actions:
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
tcib_packages:
common:
- openstack-watcher-applier
tcib_user: watcher
6 changes: 6 additions & 0 deletions container-images/tcib/base/os/watcher-base/watcher-base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tcib_actions:
- run: bash /usr/local/bin/uid_gid_manage watcher
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
tcib_packages:
common:
- openstack-watcher-common
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tcib_actions:
- run: dnf -y install {{ tcib_packages['common'] | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf
tcib_packages:
common:
- openstack-watcher-decision-engine
tcib_user: watcher

0 comments on commit 84602e0

Please sign in to comment.