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
1769760d
Commit
1769760d
authored
May 05, 2016
by
Francois Deppierraz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatically detect swift URL if not specified
parent
53eef9e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
config-default.sh
cluster/openstack-heat/config-default.sh
+1
-2
util.sh
cluster/openstack-heat/util.sh
+6
-7
No files found.
cluster/openstack-heat/config-default.sh
View file @
1769760d
...
...
@@ -35,8 +35,7 @@ MINION_FLAVOR=${MINION_FLAVOR:-m1.medium}
EXTERNAL_NETWORK
=
${
EXTERNAL_NETWORK
:-
public
}
#FIXME This can get set by evaulating the output of `swift auth` and stripping the base URL from OS_STORAGE_URL, but will require a refactor. Till then...
SWIFT_SERVER_URL
=
${
SWIFT_SERVER_URL
:-
http
://192.168.123.100:8080
}
SWIFT_SERVER_URL
=
${
SWIFT_SERVER_URL
:-}
# Flag indicates if new image must be created. If 'false' then image with IMAGE_ID will be used.
# If 'true' then new image will be created from file config-image.sh
...
...
cluster/openstack-heat/util.sh
View file @
1769760d
...
...
@@ -91,11 +91,6 @@ function create-stack() {
echo
"[INFO] Execute commands to create Kubernetes cluster"
# It is required for some cloud provider like CityCloud where swift client has different credentials
source
"
${
ROOT
}
/openrc-swift.sh"
if
[[
-z
${
OS_PROJECT_ID
+x
}
]]
;
then
SWIFT_PROJECT_ID
=
"
${
OS_TENANT_ID
}
"
else
SWIFT_PROJECT_ID
=
"
${
OS_PROJECT_ID
}
"
fi
upload-resources
source
"
${
ROOT
}
/openrc-default.sh"
...
...
@@ -168,7 +163,6 @@ function create-glance-image() {
# KUBERNETES_KEYPAIR_NAME
# DNS_SERVER
# SWIFT_SERVER_URL
# SWIFT_TENANT_ID
# OPENSTACK_IMAGE_NAME
# EXTERNAL_NETWORK
# IMAGE_ID
...
...
@@ -181,7 +175,12 @@ function create-glance-image() {
function
run-heat-script
()
{
local
stack_status
=
$(
openstack stack show
${
STACK_NAME
})
local
swift_repo_url
=
"
${
SWIFT_SERVER_URL
}
/v1/AUTH_
${
SWIFT_PROJECT_ID
}
/kubernetes"
# Automatically detect swift url if it wasn't specified
if
[[
-z
$SWIFT_SERVER_URL
]]
;
then
SWIFT_SERVER_URL
=
$(
openstack catalog show object-store
--format
value | egrep
-o
"publicURL: (.+)$"
|
cut
-d
" "
-f2
)
fi
local
swift_repo_url
=
"
${
SWIFT_SERVER_URL
}
/kubernetes"
if
[
$CREATE_IMAGE
=
true
]
;
then
echo
"[INFO] Retrieve new image ID"
...
...
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