-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94e7552
commit 97af734
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
/var/cfengine/bin/cf-agent -KIf update.cf | ||
/var/cfengine/bin/cf-agent -KI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ROOT="/opt/cfengine/masterfiles_staging" | ||
GIT_URL="https://github.com/craigcomstock/play-cfbs" | ||
GIT_REFSPEC="simple" | ||
GIT_USERNAME="" | ||
GIT_PASSWORD="" | ||
GIT_WORKING_BRANCH="CF_WORKING_BRANCH" | ||
PKEY="/opt/cfengine/userworkdir/admin/.ssh/id_rsa.pvt" | ||
SCRIPT_DIR="/var/cfengine/httpd/htdocs/api/dc-scripts" | ||
VCS_TYPE="GIT_CFBS" | ||
|
||
export PATH="${PATH}:/var/cfengine/bin" | ||
export PKEY | ||
export GIT_USERNAME | ||
export GIT_PASSWORD | ||
export GIT_SSH="${SCRIPT_DIR}/ssh-wrapper.sh" | ||
export GIT_ASKPASS="${SCRIPT_DIR}/git-askpass.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
server=testhub | ||
clients=debian-10 centos-7 | ||
hosts=$server $clients | ||
policy_server_ip=192.168.56.202 | ||
|
||
for host in $hosts; do | ||
cf-remote uninstall -H vagrant@$host | ||
done | ||
|
||
cf-remote install --edition community --client vagrant@$server --bootstrap $policy_server_ip | ||
cf-remote sudo -H vagrant@$server "curl --silent https://raw.githubusercontent.com/cfengine/core/master/contrib/masterfiles-stage/install-masterfiles-stage.sh --remote-name" | ||
cf-remote sudo -H vagrant@$server "chmod +x install-masterfiles-stage.sh" | ||
cf-remote sudo -H vagrant@$server "./install-masterfiles-stage.sh" | ||
cf-remote scp -H vagrant@$server params.sh /opt/cfengine/dc-scripts/params.sh | ||
cf-remote scp -H vagrant@$server cfe /usr/bin/ | ||
cf-remote sudo -H vagrant@$server cfe | ||
exit 0 | ||
|
||
for client in $clients; do | ||
cf-remote install --edition community --client vagrant@$client --bootstrap $policy_server_ip | ||
done |