ManageIQ / manageiq-appliance-build

Scripts to build ManageIQ appliances
Apache License 2.0
10 stars 55 forks source link

move appliance initialization service to appliance repo #480

Closed kbrock closed 3 years ago

kbrock commented 3 years ago

This static file is currently generated as part of the rpm. Instead, keep it under source control as a regular service.

miq-bot commented 3 years ago

Checked commit https://github.com/kbrock/manageiq-appliance-build/commit/8fd4c4ea8da6fb6b85ae9b548bfaa5af151934b4 with ruby 2.6.3, rubocop 1.13.0, haml-lint 0.35.0, and yamllint 0 files checked, 0 offenses detected Everything looks fine. :trophy:

Fryguy commented 3 years ago

@kbrock A conflict occurred during the backport of this pull request to morphy.

If this pull request is based on another pull request that has not been marked for backport, add the appropriate labels to the other pull request. Otherwise, please create a new pull request direct to the morphy branch in order to resolve this.

Conflict details:

diff --cc kickstarts/partials/post/db_init.ks.erb
index 71b581b,a7c7a55..0000000
--- a/kickstarts/partials/post/db_init.ks.erb
+++ b/kickstarts/partials/post/db_init.ks.erb
@@@ -1,28 -1,1 +1,32 @@@
++<<<<<<< HEAD:kickstarts/partials/post/db_init.ks.erb
 +# Create a script to initialize appliance on first boot
 +cat > /bin/appliance-initialize.sh <<EOF
 +#!/bin/sh
 +[[ -d /var/lib/pgsql/data/base ]] && exit 0
 +[[ -s /etc/default/evm ]] && source /etc/default/evm
 +echo "Initializing Appliance, please wait ..." > /dev/tty1
 +appliance_console_cli --region 0 --internal --password smartvm --key
 +EOF
 +chmod 755 /bin/appliance-initialize.sh
 +
 +# Create a systemd service to run it on first boot
 +cat > /usr/lib/systemd/system/appliance-initialize.service <<EOF
 +[Unit]
 +Description=Initialize Appliance Database
 +ConditionPathExists=!/var/lib/pgsql/data/base
 +After=evminit.service memcached.service
 +Before=evmserverd.service
 +Requires=memcached.service
 +[Service]
 +Type=oneshot
 +ExecStart=/bin/appliance-initialize.sh
 +ExecStartPost=/usr/bin/systemctl disable appliance-initialize
 +[Install]
 +WantedBy=multi-user.target
 +EOF
 +
 +# Finally, enable the service
 +systemctl enable appliance-initialize
++=======
+ systemctl enable manageiq-initialize
++>>>>>>> 89be564... Merge pull request #480 from kbrock/init-service:kickstarts/partials/post/appliance_init.ks.erb
Fryguy commented 3 years ago

Backported to morphy via https://github.com/ManageIQ/manageiq-appliance-build/pull/486