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
c92c63b3
Commit
c92c63b3
authored
Jun 04, 2015
by
Justin Santa Barbara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AWS: Use s3 sync to optimize upload to s3 when nothing changed
parent
a161edb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
util.sh
cluster/aws/util.sh
+10
-5
No files found.
cluster/aws/util.sh
View file @
c92c63b3
...
@@ -298,15 +298,20 @@ function upload-server-tars() {
...
@@ -298,15 +298,20 @@ function upload-server-tars() {
local
-r
staging_path
=
"devel"
local
-r
staging_path
=
"devel"
echo
"+++ Staging server tars to S3 Storage:
${
AWS_S3_BUCKET
}
/
${
staging_path
}
"
local
-r
local_dir
=
"
${
KUBE_TEMP
}
/s3/"
mkdir
${
local_dir
}
echo
"+++ Staging server tars to S3 Storage:
${
AWS_S3_BUCKET
}
/
${
staging_path
}
"
local
server_binary_path
=
"
${
staging_path
}
/
${
SERVER_BINARY_TAR
##*/
}
"
local
server_binary_path
=
"
${
staging_path
}
/
${
SERVER_BINARY_TAR
##*/
}
"
aws s3
cp
"
${
SERVER_BINARY_TAR
}
"
"s3://
${
AWS_S3_BUCKET
}
/
${
server_binary_path
}
"
cp
-a
"
${
SERVER_BINARY_TAR
}
"
${
local_dir
}
cp
-a
"
${
SALT_TAR
}
"
${
local_dir
}
aws s3
sync
--exact-timestamps
${
local_dir
}
"s3://
${
AWS_S3_BUCKET
}
/
${
staging_path
}
/"
aws s3api put-object-acl
--bucket
${
AWS_S3_BUCKET
}
--key
"
${
server_binary_path
}
"
--grant-read
'uri="http://acs.amazonaws.com/groups/global/AllUsers"'
aws s3api put-object-acl
--bucket
${
AWS_S3_BUCKET
}
--key
"
${
server_binary_path
}
"
--grant-read
'uri="http://acs.amazonaws.com/groups/global/AllUsers"'
SERVER_BINARY_TAR_URL
=
"
${
s3_url_base
}
/
${
AWS_S3_BUCKET
}
/
${
server_binary_path
}
"
SERVER_BINARY_TAR_URL
=
"
${
s3_url_base
}
/
${
AWS_S3_BUCKET
}
/
${
server_binary_path
}
"
local
salt_tar_path
=
"
${
staging_path
}
/
${
SALT_TAR
##*/
}
"
local
salt_tar_path
=
"
${
staging_path
}
/
${
SALT_TAR
##*/
}
"
aws s3
cp
"
${
SALT_TAR
}
"
"s3://
${
AWS_S3_BUCKET
}
/
${
salt_tar_path
}
"
aws s3api put-object-acl
--bucket
${
AWS_S3_BUCKET
}
--key
"
${
salt_tar_path
}
"
--grant-read
'uri="http://acs.amazonaws.com/groups/global/AllUsers"'
aws s3api put-object-acl
--bucket
${
AWS_S3_BUCKET
}
--key
"
${
salt_tar_path
}
"
--grant-read
'uri="http://acs.amazonaws.com/groups/global/AllUsers"'
SALT_TAR_URL
=
"
${
s3_url_base
}
/
${
AWS_S3_BUCKET
}
/
${
salt_tar_path
}
"
SALT_TAR_URL
=
"
${
s3_url_base
}
/
${
AWS_S3_BUCKET
}
/
${
salt_tar_path
}
"
}
}
...
@@ -441,10 +446,10 @@ function kube-up {
...
@@ -441,10 +446,10 @@ function kube-up {
find-release-tars
find-release-tars
upload-server-tars
ensure-temp-dir
ensure-temp-dir
upload-server-tars
ensure-iam-profiles
ensure-iam-profiles
get-password
get-password
...
...
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