Skip to content
Snippets Groups Projects
Commit 31cd0118 authored by Arie Peterson's avatar Arie Peterson
Browse files

Fix rke config location

parent d0e16875
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
include_role:
role: rke_configuration
vars:
rke_configuration_location: "/oas/local/control/kube/config"
rke_configuration_location: "/oas/local/control/rke/cluster.yml"
rke_ssh_key_path: "/oas/config/ssh_key"
rke_ssh_agent_auth: "false"
become: true
......
......@@ -7,17 +7,15 @@ buildCluster()
{
echo "Setting up OpenAppStack cluster."
mkdir -p "/control/config"
clusterConfigFile="/control/config/cluster.yml"
cp "/control/data/cluster.yml.template" "$clusterConfigFile"
mkdir -p "${HOME}/.ssh"
sed -i -e "s/\$NODE_ADDRESS/${ip}/" "$clusterConfigFile"
clusterConfigFile="/control/local/rke/cluster.yml"
{
echo "# Inserted for OpenAppStack control"
ssh-keyscan -H "$ip" 2> /dev/null
} >> "/etc/ssh/ssh_known_hosts"
rke up --config="$clusterConfigFile" || exit
mkdir -p "/control/local/kube"
cp "/control/config/kube_config_cluster.yml" "/control/local/kube/config"
# Copy kubectl config file generated by rke.
cp "/control/local/rke/kube_config_cluster.yml" "/control/local/kube/config"
}
installTiller()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment