Code Review
/
icn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Replace virtualbmc with sushy-emulator"
[icn.git]
/
deploy
/
site
/
vm
/
vm.sh
diff --git
a/deploy/site/vm/vm.sh
b/deploy/site/vm/vm.sh
index
20cae73
..
3f3b3fb
100755
(executable)
--- a/
deploy/site/vm/vm.sh
+++ b/
deploy/site/vm/vm.sh
@@
-24,7
+24,7
@@
function build_source {
# attempting to encrypt it twice below
if [[ -f ${FLUX_SOPS_PRIVATE_KEY} ]]; then
gpg --import ${FLUX_SOPS_PRIVATE_KEY}
# attempting to encrypt it twice below
if [[ -f ${FLUX_SOPS_PRIVATE_KEY} ]]; then
gpg --import ${FLUX_SOPS_PRIVATE_KEY}
- sops_decrypt
_site
${SCRIPTDIR}/site.yaml
+ sops_decrypt ${SCRIPTDIR}/site.yaml
fi
# Generate user password and authorized key in site YAML
fi
# Generate user password and authorized key in site YAML
@@
-39,7
+39,7
@@
function build_source {
# Encrypt the site YAML
create_gpg_key ${FLUX_SOPS_KEY_NAME}
# Encrypt the site YAML
create_gpg_key ${FLUX_SOPS_KEY_NAME}
- sops_encrypt
_site
${SCRIPTDIR}/site.yaml ${FLUX_SOPS_KEY_NAME}
+ sops_encrypt ${SCRIPTDIR}/site.yaml ${FLUX_SOPS_KEY_NAME}
# ONLY FOR TEST ENVIRONMENT: save the private key used
export_gpg_private_key ${FLUX_SOPS_KEY_NAME} >${FLUX_SOPS_PRIVATE_KEY}
# ONLY FOR TEST ENVIRONMENT: save the private key used
export_gpg_private_key ${FLUX_SOPS_KEY_NAME} >${FLUX_SOPS_PRIVATE_KEY}
@@
-70,6
+70,10
@@
function insert_control_plane_network_identity_into_ssh_config {
# This enables logging into the control plane machines from this
# machine without specifying the identify file on the command line
# This enables logging into the control plane machines from this
# machine without specifying the identify file on the command line
+ if [[ ! $(which ipcalc) ]]; then
+ apt-get install -y ipcalc
+ fi
+
# Create ssh config if it doesn't exist
mkdir -p ${HOME}/.ssh && chmod 700 ${HOME}/.ssh
touch ${HOME}/.ssh/config
# Create ssh config if it doesn't exist
mkdir -p ${HOME}/.ssh && chmod 700 ${HOME}/.ssh
touch ${HOME}/.ssh/config