Skip to content

Commit

Permalink
Craigs-MacBook-Pro.local
Browse files Browse the repository at this point in the history
  • Loading branch information
craigcomstock committed Apr 24, 2024
1 parent 94e7552 commit 97af734
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cfe
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
16 changes: 16 additions & 0 deletions params.sh
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"
21 changes: 21 additions & 0 deletions setup.sh
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

0 comments on commit 97af734

Please sign in to comment.