Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
olcf
container-builder
Commits
15a783aa
Commit
15a783aa
authored
Jan 29, 2018
by
AdamSimpson
Browse files
fix builder OpenStack credential propagation
parent
557cf061
Pipeline
#11550
failed with stages
in 68 minutes and 37 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Scripts/create-queue.sh
View file @
15a783aa
...
...
@@ -48,12 +48,11 @@ ssh -o StrictHostKeyChecking=no -i ${KEY_FILE} cades@${VM_IP} 'sudo bash -s' < $
# Copy OpenStack credentials to VM and then move to correct directory
# These credentials are available as environment variables to the runners
printenv
|
grep
^OS_
>
./queue_profile
# "Reconstruct" openrc.sh
awk
'{print "export "$0}'
./queue_profile
>
tmp_awk
&&
mv
tmp_awk ./queue_profile
scp
-o
StrictHostKeyChecking
=
no
-i
${
KEY_FILE
}
./queue_profile cades@
${
VM_IP
}
:/home/cades/queue_profile
ssh
-o
StrictHostKeyChecking
=
no
-i
${
KEY_FILE
}
cades@
${
VM_IP
}
'sudo mv /home/cades/queue_profile /home/queue/.profile'
printenv
|
grep
^OS_
>
./openrc.sh
# "Reconstruct" openrc.sh
scp
-o
StrictHostKeyChecking
=
no
-i
${
KEY_FILE
}
./openrc.sh cades@
${
VM_IP
}
:/home/cades/openrc.sh
ssh
-o
StrictHostKeyChecking
=
no
-i
${
KEY_FILE
}
cades@
${
VM_IP
}
'sudo mv /home/cades/openrc.sh /home/queue/openrc.sh'
# Reboot to
ensure Q
ueue service
,
added in provisioning
, is started
# Reboot to
start q
ueue service added in provisioning
openstack server reboot
--wait
${
VM_UUID
}
echo
"Started
${
VM_UUID
}
with external IP
${
VM_IP
}
using
${
KEY_FILE
}
"
...
...
Scripts/provision-queue.sh
View file @
15a783aa
...
...
@@ -47,6 +47,7 @@ After=network.target
[Service]
Type=simple
User=queue
EnvironmentFile="/home/queue/openrc.sh"
Environment="LD_LIBRARY_PATH=
${
LD_LIBRARY_PATH
}
:/usr/local/lib"
WorkingDirectory=/home/queue
ExecStart=/usr/local/bin/builder-queue
...
...
@@ -56,6 +57,4 @@ Restart=no
WantedBy=multi-user.target
EOF
# There appears to be some weird issues with starting systemd services inside of a cloud-init script
# The easiest thing to do is just reboot after enabling the service
systemctl
enable
builder-queue
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment