Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion vagrant/provision-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Description=openshift master
After=network.service

[Service]
ExecStart=/usr/bin/openshift start master --master=http://${MASTER_IP}:8080 --listen=http://0.0.0.0:8080 --nodes=${node_list}
ExecStart=/usr/bin/openshift start master --public-master=${MASTER_IP} --nodes=${node_list}
WorkingDirectory=/vagrant/

[Install]
WantedBy=multi-user.target
Expand All @@ -57,3 +58,7 @@ systemctl start openshift-master.service
if [ "${OPENSHIFT_SDN}" == "ovs-simple" ]; then
$(dirname $0)/provision-master-sdn.sh $@
fi

# Set up the KUBECONFIG environment variable for use by the client
echo 'export KUBECONFIG=/vagrant/openshift.local.certificates/admin/.kubeconfig' >> /root/.bash_profile
echo 'export KUBECONFIG=/vagrant/openshift.local.certificates/admin/.kubeconfig' >> /home/vagrant/.bash_profile
11 changes: 10 additions & 1 deletion vagrant/provision-minion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,19 @@ fi

usermod -a -G docker vagrant

# Copy over the certificates directory and modify the kubeconfig file to use the master ip
cp -r /vagrant/openshift.local.certificates /
chown -R vagrant.vagrant /openshift.local.certificates
sed -ie "s/10.0.2.15/${MASTER_IP}/g" /openshift.local.certificates/admin/.kubeconfig

# Create systemd service
cat <<EOF > /usr/lib/systemd/system/openshift-node.service
[Unit]
Description=openshift node
After=network.service

[Service]
ExecStart=/usr/bin/openshift start node --master=http://${MASTER_IP}:8080
ExecStart=/usr/bin/openshift start node --kubeconfig=/openshift.local.certificates/admin/.kubeconfig --master=https://${MASTER_IP}:8443
Restart=on-failure
RestartSec=10s

Expand All @@ -61,5 +66,9 @@ systemctl daemon-reload
systemctl enable openshift-node.service
systemctl start openshift-node.service

# Set up the KUBECONFIG environment variable for use by the client
echo 'export KUBECONFIG=/openshift.local.certificates/admin/.kubeconfig' >> /root/.bash_profile
echo 'export KUBECONFIG=/openshift.local.certificates/admin/.kubeconfig' >> /home/vagrant/.bash_profile

# Register with the master
#curl -X POST -H 'Accept: application/json' -d "{\"kind\":\"Minion\", \"id\":"${MINION_IP}", \"apiVersion\":\"v1beta1\", \"hostIP\":"${MINION_IP}" }" http://${MASTER_IP}:8080/api/v1beta1/minions