b120be1772
This commit will merge into trove, the trove-integration tree as of commit 9f92ca853f8aa2f72921e54682c918941a8f0919. This is in preparation for making trove-integration go away. In addition, it supresses any consideration of the integration directory in the trove tox tests as it is understandably a small pile of pooh and in need of much cleanup. Change-Id: Ib7f2655c4c5ed86b5454708c04371ee55e37ec2d Partially-Implements-Blueprint: eliminate-trove-integration-and-redstack
33 lines
1.5 KiB
Plaintext
33 lines
1.5 KiB
Plaintext
[Unit]
|
|
Description=Trove Guest
|
|
After=syslog.target
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=GUEST_USERNAME
|
|
Group=GUEST_USERNAME
|
|
|
|
ExecStartPre=/bin/bash -c "sudo mkdir -p GUEST_LOGDIR ; sudo chown GUEST_USERNAME:root GUEST_LOGDIR"
|
|
|
|
# If ~/trove-installed does not exist, copy the trove source from
|
|
# the user's development environment, then touch the sentinel file
|
|
ExecStartPre=/bin/bash -c "test -d /home/GUEST_USERNAME/trove-installed || sudo -u GUEST_USERNAME rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' -avz --exclude='.*' HOST_SCP_USERNAME@CONTROLLER_IP:PATH_TROVE/ /home/GUEST_USERNAME/trove && touch /home/GUEST_USERNAME/trove-installed"
|
|
|
|
# If /etc/trove does not exist, create it and then copy the trove-guestagent.conf
|
|
# from /etc/trove on the user's development environment,
|
|
ExecStartPre=/bin/bash -c "test -d /etc/trove/conf.d || sudo mkdir -p /etc/trove/conf.d && sudo -u GUEST_USERNAME rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' -avz --exclude='.*' HOST_SCP_USERNAME@CONTROLLER_IP:/etc/trove/trove-guestagent.conf ~GUEST_USERNAME/ && sudo mv ~GUEST_USERNAME/trove-guestagent.conf /etc/trove/conf.d/trove-guestagent.conf"
|
|
|
|
ExecStartPre=/bin/bash -c "sudo chown -R GUEST_USERNAME:root /etc/trove"
|
|
|
|
ExecStart=/home/GUEST_USERNAME/trove/contrib/trove-guestagent --config-dir=/etc/trove/conf.d
|
|
|
|
# Give a reasonable amount of time for the server to start up/shut down
|
|
TimeoutSec=300
|
|
|
|
# PgSql doesn't play nice with PrivateTmp
|
|
PrivateTmp=false
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|