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
bb869367
Commit
bb869367
authored
Dec 01, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17803 from davidsiefert/master
Auto commit by PR queue bot
parents
74049947
94d32588
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
21 deletions
+36
-21
util.sh
cluster/aws/util.sh
+36
-21
No files found.
cluster/aws/util.sh
View file @
bb869367
...
@@ -667,25 +667,7 @@ function assign-elastic-ip {
...
@@ -667,25 +667,7 @@ function assign-elastic-ip {
fi
fi
}
}
function
ssh-key-setup
{
function
kube-up
{
echo
"Starting cluster using os distro:
${
KUBE_OS_DISTRIBUTION
}
"
>
&2
get-tokens
detect-image
detect-minion-image
find-release-tars
ensure-temp-dir
upload-server-tars
ensure-iam-profiles
load-or-gen-kube-basicauth
if
[[
!
-f
"
$AWS_SSH_KEY
"
]]
;
then
if
[[
!
-f
"
$AWS_SSH_KEY
"
]]
;
then
ssh-keygen
-f
"
$AWS_SSH_KEY
"
-N
''
ssh-keygen
-f
"
$AWS_SSH_KEY
"
-N
''
fi
fi
...
@@ -698,7 +680,9 @@ function kube-up {
...
@@ -698,7 +680,9 @@ function kube-up {
AWS_SSH_KEY_NAME
=
"kubernetes-
${
AWS_SSH_KEY_FINGERPRINT
//
:/
}
"
AWS_SSH_KEY_NAME
=
"kubernetes-
${
AWS_SSH_KEY_FINGERPRINT
//
:/
}
"
import-public-key
${
AWS_SSH_KEY_NAME
}
${
AWS_SSH_KEY
}
.pub
import-public-key
${
AWS_SSH_KEY_NAME
}
${
AWS_SSH_KEY
}
.pub
}
function
vpc-setup
{
if
[[
-z
"
${
VPC_ID
:-}
"
]]
;
then
if
[[
-z
"
${
VPC_ID
:-}
"
]]
;
then
VPC_ID
=
$(
get_vpc_id
)
VPC_ID
=
$(
get_vpc_id
)
fi
fi
...
@@ -712,9 +696,9 @@ function kube-up {
...
@@ -712,9 +696,9 @@ function kube-up {
fi
fi
echo
"Using VPC
$VPC_ID
"
echo
"Using VPC
$VPC_ID
"
}
create-dhcp-option-set
function
subnet-setup
{
if
[[
-z
"
${
SUBNET_ID
:-}
"
]]
;
then
if
[[
-z
"
${
SUBNET_ID
:-}
"
]]
;
then
SUBNET_ID
=
$(
get_subnet_id
$VPC_ID
$ZONE
)
SUBNET_ID
=
$(
get_subnet_id
$VPC_ID
$ZONE
)
fi
fi
...
@@ -734,6 +718,33 @@ function kube-up {
...
@@ -734,6 +718,33 @@ function kube-up {
fi
fi
echo
"Using subnet
$SUBNET_ID
"
echo
"Using subnet
$SUBNET_ID
"
}
function
kube-up
{
echo
"Starting cluster using os distro:
${
KUBE_OS_DISTRIBUTION
}
"
>
&2
get-tokens
detect-image
detect-minion-image
find-release-tars
ensure-temp-dir
upload-server-tars
ensure-iam-profiles
load-or-gen-kube-basicauth
ssh-key-setup
vpc-setup
create-dhcp-option-set
subnet-setup
IGW_ID
=
$(
get_igw_id
$VPC_ID
)
IGW_ID
=
$(
get_igw_id
$VPC_ID
)
if
[[
-z
"
$IGW_ID
"
]]
;
then
if
[[
-z
"
$IGW_ID
"
]]
;
then
...
@@ -804,12 +815,14 @@ function kube-up {
...
@@ -804,12 +815,14 @@ function kube-up {
# Start minions
# Start minions
start-minions
start-minions
wait-minions
else
else
# Create the master
# Create the master
start-master
start-master
# Start minions
# Start minions
start-minions
start-minions
wait-minions
# Wait for the master to be ready
# Wait for the master to be ready
wait-master
wait-master
...
@@ -1018,7 +1031,9 @@ function start-minions() {
...
@@ -1018,7 +1031,9 @@ function start-minions() {
--tags
ResourceId
=
${
ASG_NAME
}
,ResourceType
=
auto-scaling-group,Key
=
Name,Value
=
${
NODE_INSTANCE_PREFIX
}
\
--tags
ResourceId
=
${
ASG_NAME
}
,ResourceType
=
auto-scaling-group,Key
=
Name,Value
=
${
NODE_INSTANCE_PREFIX
}
\
ResourceId
=
${
ASG_NAME
}
,ResourceType
=
auto-scaling-group,Key
=
Role,Value
=
${
NODE_TAG
}
\
ResourceId
=
${
ASG_NAME
}
,ResourceType
=
auto-scaling-group,Key
=
Role,Value
=
${
NODE_TAG
}
\
ResourceId
=
${
ASG_NAME
}
,ResourceType
=
auto-scaling-group,Key
=
KubernetesCluster,Value
=
${
CLUSTER_ID
}
ResourceId
=
${
ASG_NAME
}
,ResourceType
=
auto-scaling-group,Key
=
KubernetesCluster,Value
=
${
CLUSTER_ID
}
}
function
wait-minions
{
# Wait for the minions to be running
# Wait for the minions to be running
# TODO(justinsb): This is really not needed any more
# TODO(justinsb): This is really not needed any more
attempt
=
0
attempt
=
0
...
...
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