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
028a0140
Commit
028a0140
authored
Nov 01, 2016
by
Euan Kemp
Committed by
Euan Kemp
Dec 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cluster/coreos: delete mounter
We don't use this bit of gci currently.
parent
13afe18a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
198 deletions
+0
-198
Changelog
cluster/gce/coreos/mounter/Changelog
+0
-7
Dockerfile
cluster/gce/coreos/mounter/Dockerfile
+0
-20
Makefile
cluster/gce/coreos/mounter/Makefile
+0
-30
mounter
cluster/gce/coreos/mounter/mounter
+0
-55
stage-upload.sh
cluster/gce/coreos/mounter/stage-upload.sh
+0
-86
No files found.
cluster/gce/coreos/mounter/Changelog
deleted
100644 → 0
View file @
13afe18a
## v1 (Thu Oct 20 2016 Vishnu Kannan <vishh@google.com>)
- Creating a container with mount tools pre-installed
- Digest: sha256:9b3c1f04ad6b8947af4eb98f1eff2dc54c5664e3469b4cdf722ec5dd2a1dc064
## v2 (Fri Oct 28 2016 Vishnu Kannan <vishh@google.com>)
- Adding netbase package.
- Digest: sha256:c7dfe059fbbf976fc4284a87eb18adf0f8e0c4cf30a30f5a852842c772a64c2d
cluster/gce/coreos/mounter/Dockerfile
deleted
100644 → 0
View file @
13afe18a
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM
ubuntu:xenial
MAINTAINER
vishh@google.com
RUN
apt-get update
&&
apt-get
install
-y
netbase nfs-common
=
1:1.2.8-9ubuntu12 glusterfs-client
=
3.7.6-1ubuntu1
ENTRYPOINT
["/bin/mount"]
cluster/gce/coreos/mounter/Makefile
deleted
100644 → 0
View file @
13afe18a
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
TAG
=
v2
REGISTRY
=
gcr.io/google_containers
IMAGE
=
gci-mounter
all
:
container
container
:
docker build
--pull
-t
${
REGISTRY
}
/
${
IMAGE
}
:
${
TAG
}
.
push
:
gcloud docker
--
push
${
REGISTRY
}
/
${
IMAGE
}
:
${
TAG
}
upload
:
./stage-upload.sh
${
TAG
}
${
REGISTRY
}
/
${
IMAGE
}
:
${
TAG
}
.PHONY
:
all container push
cluster/gce/coreos/mounter/mounter
deleted
100755 → 0
View file @
13afe18a
#!/bin/bash
# Copyright 2014 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set
-o
errexit
set
-o
nounset
set
-o
pipefail
MOUNTER_VERSION
=
v2
MOUNTER_USER
=
root
ROOT_DIR
=
/home/kubernetes/bin
RKT_BINARY
=
${
ROOT_DIR
}
/rkt
STAGE1_ACI
=
${
ROOT_DIR
}
/stage1-fly.aci
MOUNTER_ACI
=
${
ROOT_DIR
}
/gci-mounter-
${
MOUNTER_VERSION
}
.aci
MOUNTER_IMAGE
=
gcr.io/google_containers/gci-mounter:
${
MOUNTER_VERSION
}
function
gc
{
# Attempt to garbage collect rkt pods with 5 retries.
# Rkt pods end up creating new copies of mounts on the host. Hence it is ideal to clean them up right away.
attempt
=
0
until
[
$attempt
-ge
5
]
;
do
${
RKT_BINARY
}
gc
--grace-period
=
0s &> /dev/null
attempt
=
$[$attempt
+1]
sleep
1
done
}
# Garbage collect old rkt containers on exit
trap
gc EXIT
if
[[
!
$(${
RKT_BINARY
}
image list |
grep
${
MOUNTER_IMAGE
})
]]
;
then
${
RKT_BINARY
}
fetch
--insecure-options
=
image file://
${
MOUNTER_ACI
}
fi
echo
"Running mount using a rkt fly container"
${
RKT_BINARY
}
run
--stage1-path
=
${
STAGE1_ACI
}
\
--insecure-options
=
image
\
--volume
=
kubelet,kind
=
host,source
=
/var/lib/kubelet,readOnly
=
false
,recursive
=
true
\
--mount
volume
=
kubelet,target
=
/var/lib/kubelet
\
${
MOUNTER_IMAGE
}
--user
=
${
MOUNTER_USER
}
--exec
/bin/mount
--
"
$@
"
echo
"Successfully ran mount using a rkt fly container"
cluster/gce/coreos/mounter/stage-upload.sh
deleted
100755 → 0
View file @
13afe18a
#!/bin/sh
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Due to the GCE custom metadata size limit, we split the entire script into two
# files configure.sh and configure-helper.sh. The functionality of downloading
# kubernetes configuration, manifests, docker images, and binary files are
# put in configure.sh, which is uploaded via GCE custom metadata.
set
-o
errexit
set
-o
pipefail
set
-o
nounset
RKT_VERSION
=
"v1.18.0"
DOCKER2ACI_VERSION
=
"v0.13.0"
MOUNTER_VERSION
=
$1
DOCKER_IMAGE
=
docker://
$2
MOUNTER_ACI_IMAGE
=
gci-mounter-
${
MOUNTER_VERSION
}
.aci
RKT_GCS_DIR
=
gs://kubernetes-release/rkt/
MOUNTER_GCS_DIR
=
gs://kubernetes-release/gci-mounter/
TMPDIR
=
/tmp
# Setup a working directory
DOWNLOAD_DIR
=
$(
mktemp
--tmpdir
=
${
TMPDIR
}
-d
gci-mounter-build.XXXXXXXXXX
)
# Setup a staging directory
STAGING_DIR
=
$(
mktemp
--tmpdir
=
${
TMPDIR
}
-d
gci-mounter-staging.XXXXXXXXXX
)
RKT_DIR
=
${
STAGING_DIR
}
/
${
RKT_VERSION
}
ACI_DIR
=
${
STAGING_DIR
}
/gci-mounter
CWD
=
${
PWD
}
# Cleanup the temporary directories
function
cleanup
{
rm
-rf
${
DOWNLOAD_DIR
}
rm
-rf
${
STAGING_DIR
}
cd
${
CWD
}
}
# Delete temporary directories on exit
trap
cleanup EXIT
mkdir
${
RKT_DIR
}
mkdir
${
ACI_DIR
}
# Download rkt
cd
${
DOWNLOAD_DIR
}
echo
"Downloading rkt
${
RKT_VERSION
}
"
wget
"https://github.com/coreos/rkt/releases/download/
${
RKT_VERSION
}
/rkt-
${
RKT_VERSION
}
.tar.gz"
&> /dev/null
echo
"Extracting rkt
${
RKT_VERSION
}
"
tar
xzf rkt-
${
RKT_VERSION
}
.tar.gz
# Stage rkt into working directory
cp
rkt-
${
RKT_VERSION
}
/rkt
${
RKT_DIR
}
/rkt
cp
rkt-
${
RKT_VERSION
}
/stage1-fly.aci
${
RKT_DIR
}
/
# Convert docker image to aci and stage it
echo
"Downloading docker2aci
${
DOCKER2ACI_VERSION
}
"
wget
"https://github.com/appc/docker2aci/releases/download/
${
DOCKER2ACI_VERSION
}
/docker2aci-
${
DOCKER2ACI_VERSION
}
.tar.gz"
&> /dev/null
echo
"Extracting docker2aci
${
DOCKER2ACI_VERSION
}
"
tar
xzf docker2aci-
${
DOCKER2ACI_VERSION
}
.tar.gz
ACI_IMAGE
=
$(${
DOWNLOAD_DIR
}
/docker2aci-
${
DOCKER2ACI_VERSION
}
/docker2aci
${
DOCKER_IMAGE
}
2>/dev/null |
tail
-n
1
)
cp
${
ACI_IMAGE
}
${
ACI_DIR
}
/
${
MOUNTER_ACI_IMAGE
}
# Upload the contents to gcs
echo
"Uploading rkt artifacts in
${
RKT_DIR
}
to
${
RKT_GCS_DIR
}
"
gsutil
cp
-R
${
RKT_DIR
}
${
RKT_GCS_DIR
}
echo
"Uploading gci mounter ACI in
${
ACI_DIR
}
to
${
MOUNTER_GCS_DIR
}
"
gsutil
cp
${
ACI_DIR
}
/
${
MOUNTER_ACI_IMAGE
}
${
MOUNTER_GCS_DIR
}
echo
"Upload completed"
echo
"Update rkt, stag1-fly.aci & gci-mounter ACI versions and SHA1 in cluster/gce/gci/configure.sh"
echo
"
${
RKT_VERSION
}
/rkt sha1:
$(
sha1sum
${
RKT_DIR
}
/rkt
)
"
echo
"
${
RKT_VERSION
}
/stage1-fly.aci sha1:
$(
sha1sum
${
RKT_DIR
}
/stage1-fly.aci
)
"
echo
"
${
MOUNTER_ACI_IMAGE
}
hash:
$(
sha1sum
${
ACI_DIR
}
/
${
MOUNTER_ACI_IMAGE
})
"
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