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

Introduce kolla_copy_cacerts #82

Merged
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
14 changes: 14 additions & 0 deletions container-images/kolla/base/copy_cacerts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Copy custom CA certificates to system trusted CA certificates folder
# and run CA update utility

if [[ -d /var/lib/config-data/ca-certificates ]] && \
[[ ! -z "$(ls -A /var/lib/config-data/ca-certificates/)" ]]; then
# CentOS
for cert in /var/lib/config-data/ca-certificates/*; do
file=$(basename "$cert")
cp $cert "/etc/pki/ca-trust/source/anchors/ospk8s-customca-$file"
done
update-ca-trust
fi
3 changes: 3 additions & 0 deletions container-images/kolla/base/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ sudo -E kolla_set_configs
CMD=$(cat /run_command)
ARGS=""

# Install custom CA certificates
sudo kolla_copy_cacerts

if [[ ! "${!KOLLA_SKIP_EXTEND_START[@]}" ]]; then
# Run additional commands if present
. kolla_extend_start
Expand Down
2 changes: 1 addition & 1 deletion container-images/kolla/base/uid_gid_manage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ _SUPPORTED_USERS['aodh']='aodh 42402 42402 /var/lib/aodh kolla'
_SUPPORTED_USERS['barbican']='barbican 42403 42403 /var/lib/barbican kolla,nfast'
_SUPPORTED_USERS['ceilometer']='ceilometer 42405 42405 /var/lib/ceilometer kolla'
_SUPPORTED_USERS['cinder']='cinder 42407 42407 /var/lib/cinder kolla'
_SUPPORTED_USERS['cloud-admin']='cloud-admin 42401 42401 /home/cloud-admin'
_SUPPORTED_USERS['cloud-admin']='cloud-admin 42401 42401 /home/cloud-admin kolla'
_SUPPORTED_USERS['designate']='designate 42411 42411 /var/lib/designate kolla'
_SUPPORTED_USERS['etcd']='etcd 42413 42413 /var/lib/etcd kolla'
_SUPPORTED_USERS['frrvty']='frrvty 42483 42483'
Expand Down
2 changes: 2 additions & 0 deletions container-images/tcib/base/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ tcib_actions:
- run: chmod 755 /usr/local/bin/kolla_start
- run: cp /usr/share/tcib/container-images/kolla/base/httpd_setup.sh /usr/local/bin/kolla_httpd_setup
- run: chmod 755 /usr/local/bin/kolla_httpd_setup
- run: cp /usr/share/tcib/container-images/kolla/base/copy_cacerts.sh /usr/local/bin/kolla_copy_cacerts
- run: chmod 755 /usr/local/bin/kolla_copy_cacerts
- run: cp /usr/share/tcib/container-images/kolla/base/sudoers /etc/sudoers
- run: chmod 440 /etc/sudoers
- run: sed -ri '/^(passwd:|group:)/ s/systemd//g' /etc/nsswitch.conf
Expand Down