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

Support persistent custom Admiral configurations #1880

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions installer/build/scripts/admiral/configure_admiral.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ iptables -w -A INPUT -j ACCEPT -p tcp --dport "${ADMIRAL_PORT}"

touch $data_dir/custom.conf

# Configure the integration URL
echo "harbor.tab.url=https://${HOSTNAME}:${REGISTRY_PORT}" > $data_dir/custom.conf

# Copy files needed by Admiral into one directory
cp $appliance_jks $config_dir
cp $appliance_tls_key $config_dir
Expand All @@ -82,6 +79,9 @@ cp $data_dir/custom.conf $config_dir/config.properties
cp $admiral_psc_dir/psc-config.keystore $config_dir
cp $admiral_psc_dir/psc-config.properties $config_dir

# Configure the integration URL
echo "harbor.tab.url=https://${HOSTNAME}:${REGISTRY_PORT}" >> $config_dir/config.properties
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this will append a new line each time the service is started. When testing the change, did you try restarting the OVA a few times to see what happens?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "$config_dir/config.properties" is newly created each time from "cp $data_dir/custom.conf $config_dir/config.properties". I thought I tested a few reboots but I will have to double check again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zjs On VIC 1.4.3 I rebooted a few times and didn't see any duplicate entries.

Copy link
Contributor

@DanielXiao DanielXiao Feb 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rebase this patch and move below proxy setting after this line?
if [ -n "${NETWORK_HTTPS_PROXY}" ]; then
echo "registry.proxy=${NETWORK_HTTPS_PROXY}" >> $data_dir/custom.conf
elif [ -n "${NETWORK_HTTP_PROXY}" ]; then
echo "registry.proxy=${NETWORK_HTTP_PROXY}" >> $data_dir/custom.conf
fi
if [ -n "${NETWORK_NO_PROXY_LIST}" ]; then
echo "registry.no.proxy.list=${NETWORK_NO_PROXY_LIST}" >> $data_dir/custom.conf
fi


echo "Copying CA certificate to $ca_download_dir"
cp $appliance_ca_cert $ca_download_dir/
$script_dir/set_guestinfo.sh -f $appliance_ca_cert "admiral.ca"
Expand Down