Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
8f2b4c3b
Commit
8f2b4c3b
authored
May 25, 2017
by
Shyam Jeedigunta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy kubeconfig to kubemark master
parent
9c1480bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
29 deletions
+30
-29
start-kubemark.sh
test/kubemark/start-kubemark.sh
+30
-29
No files found.
test/kubemark/start-kubemark.sh
View file @
8f2b4c3b
...
...
@@ -110,34 +110,6 @@ function write-pki-config-to-master {
echo
"Wrote PKI certs, keys, tokens and admin password to master."
}
# Copy all the necessary resource files (scripts/configs/manifests) to the master.
function
copy-resource-files-to-master
{
copy-files
\
"
${
SERVER_BINARY_TAR
}
"
\
"
${
RESOURCE_DIRECTORY
}
/kubemark-master-env.sh"
\
"
${
RESOURCE_DIRECTORY
}
/start-kubemark-master.sh"
\
"
${
KUBEMARK_DIRECTORY
}
/configure-kubectl.sh"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/etcd.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/etcd-events.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/kube-apiserver.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/kube-scheduler.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/kube-controller-manager.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/kube-addon-manager.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/addons/kubemark-rbac-bindings"
\
"kubernetes@
${
MASTER_NAME
}
"
:/home/kubernetes/
echo
"Copied server binary, master startup scripts, configs and resource manifests to master."
}
# Make startup scripts executable and run start-kubemark-master.sh.
function
start-master-components
{
echo
""
MASTER_STARTUP_CMD
=
"sudo chmod a+x /home/kubernetes/configure-kubectl.sh &&
\
sudo chmod a+x /home/kubernetes/start-kubemark-master.sh &&
\
sudo bash /home/kubernetes/start-kubemark-master.sh"
execute-cmd-on-master-with-retries
"
${
MASTER_STARTUP_CMD
}
"
echo
"The master has started and is now live."
}
# Write kubeconfig to ${RESOURCE_DIRECTORY}/kubeconfig.kubemark in order to
# use kubectl locally.
function
write-local-kubeconfig
{
...
...
@@ -167,6 +139,35 @@ EOF
echo
"Kubeconfig file for kubemark master written to
${
LOCAL_KUBECONFIG
}
."
}
# Copy all the necessary resource files (scripts/configs/manifests) to the master.
function
copy-resource-files-to-master
{
copy-files
\
"
${
SERVER_BINARY_TAR
}
"
\
"
${
RESOURCE_DIRECTORY
}
/kubemark-master-env.sh"
\
"
${
RESOURCE_DIRECTORY
}
/start-kubemark-master.sh"
\
"
${
RESOURCE_DIRECTORY
}
/kubeconfig.kubemark"
\
"
${
KUBEMARK_DIRECTORY
}
/configure-kubectl.sh"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/etcd.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/etcd-events.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/kube-apiserver.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/kube-scheduler.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/kube-controller-manager.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/kube-addon-manager.yaml"
\
"
${
RESOURCE_DIRECTORY
}
/manifests/addons/kubemark-rbac-bindings"
\
"kubernetes@
${
MASTER_NAME
}
"
:/home/kubernetes/
echo
"Copied server binary, master startup scripts, configs and resource manifests to master."
}
# Make startup scripts executable and run start-kubemark-master.sh.
function
start-master-components
{
echo
""
MASTER_STARTUP_CMD
=
"sudo chmod a+x /home/kubernetes/configure-kubectl.sh &&
\
sudo chmod a+x /home/kubernetes/start-kubemark-master.sh &&
\
sudo bash /home/kubernetes/start-kubemark-master.sh"
execute-cmd-on-master-with-retries
"
${
MASTER_STARTUP_CMD
}
"
echo
"The master has started and is now live."
}
# Finds the right kubemark binary for 'linux/amd64' platform and uses it to
# create a docker image for hollow-node and upload it to the appropriate
# docker container registry for the cloud provider.
...
...
@@ -378,13 +379,13 @@ create-master-instance-with-resources
generate-pki-config
wait-for-master-reachability
write-pki-config-to-master
write-local-kubeconfig
copy-resource-files-to-master
start-master-components
# Setup for hollow-nodes.
echo
""
echo
-e
"
${
color_yellow
}
STARTING SETUP FOR HOLLOW-NODES
${
color_norm
}
"
write-local-kubeconfig
create-and-upload-hollow-node-image
create-kube-hollow-node-resources
wait-for-hollow-nodes-to-run-or-timeout
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment