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
cbcc2580
Commit
cbcc2580
authored
Feb 24, 2016
by
Alex Robinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21237 from justinsb/aws_jessie_support
AWS Debian Jessie Support
parents
0b5edab2
5d7ed4d6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
51 deletions
+34
-51
util.sh
cluster/aws/jessie/util.sh
+11
-50
format-disks.sh
cluster/aws/templates/format-disks.sh
+6
-1
k8s-ebs-jessie-amd64-hvm.yml
cluster/cloudimages/k8s-ebs-jessie-amd64-hvm.yml
+7
-0
init.sls
cluster/saltbase/salt/docker/init.sls
+10
-0
No files found.
cluster/aws/jessie/util.sh
View file @
cbcc2580
...
@@ -22,60 +22,21 @@ source "${KUBE_ROOT}/cluster/aws/trusty/common.sh"
...
@@ -22,60 +22,21 @@ source "${KUBE_ROOT}/cluster/aws/trusty/common.sh"
SSH_USER
=
admin
SSH_USER
=
admin
# Detects the AMI to use for jessie (considering the region)
# Detects the AMI to use for jessie (considering the region)
# Source: https://wiki.debian.org/Cloud/AmazonEC2Image/Jessie
#
#
# Vars set:
# Vars set:
# AWS_IMAGE
# AWS_IMAGE
function
detect-jessie-image
()
{
function
detect-jessie-image
()
{
if
[[
-z
"
${
AWS_IMAGE
-
}
"
]]
;
then
if
[[
-z
"
${
AWS_IMAGE
-
}
"
]]
;
then
case
"
${
AWS_REGION
}
"
in
# TODO: publish on a k8s AWS account
ap-northeast-1
)
aws_account
=
"721322707521"
AWS_IMAGE
=
ami-e624fbe6
# TODO: we could use tags for the image
;;
if
[[
-z
"
${
AWS_IMAGE_NAME
:-}
"
]]
;
then
AWS_IMAGE_NAME
=
"k8s-1.2-debian-jessie-amd64-hvm-2016-02-24-ebs"
ap-southeast-1
)
fi
AWS_IMAGE
=
ami-ac360cfe
AWS_IMAGE
=
`
aws ec2 describe-images
--owner
${
aws_account
}
--filters
Name
=
name,Values
=
${
AWS_IMAGE_NAME
}
--query
Images[].ImageId
--output
text
`
;;
if
[[
-z
"
${
AWS_IMAGE
-
}
"
]]
;
then
echo
"Please specify AWS_IMAGE directly (image
${
AWS_IMAGE_NAME
}
not found in region
${
AWS_REGION
}
)"
ap-southeast-2
)
exit
1
AWS_IMAGE
=
ami-bbc5bd81
fi
;;
eu-central-1
)
AWS_IMAGE
=
ami-02b78e1f
;;
eu-west-1
)
AWS_IMAGE
=
ami-e31a6594
;;
sa-east-1
)
AWS_IMAGE
=
ami-0972f214
;;
us-east-1
)
AWS_IMAGE
=
ami-116d857a
;;
us-west-1
)
AWS_IMAGE
=
ami-05cf2541
;;
us-west-2
)
AWS_IMAGE
=
ami-818eb7b1
;;
cn-north-1
)
AWS_IMAGE
=
ami-888815b1
;;
us-gov-west-1
)
AWS_IMAGE
=
ami-35b5d516
;;
*
)
echo
"Please specify AWS_IMAGE directly (region
${
AWS_REGION
}
not recognized)"
exit
1
esac
fi
fi
}
}
cluster/aws/templates/format-disks.sh
View file @
cbcc2580
...
@@ -175,7 +175,9 @@ if [[ ${docker_storage} == "btrfs" ]]; then
...
@@ -175,7 +175,9 @@ if [[ ${docker_storage} == "btrfs" ]]; then
elif
[[
${
docker_storage
}
==
"aufs-nolvm"
||
${
docker_storage
}
==
"aufs"
]]
;
then
elif
[[
${
docker_storage
}
==
"aufs-nolvm"
||
${
docker_storage
}
==
"aufs"
]]
;
then
# Install aufs kernel module
# Install aufs kernel module
# Fix issue #14162 with extra-virtual
# Fix issue #14162 with extra-virtual
apt-get-install linux-image-extra-
$(
uname
-r
)
linux-image-extra-virtual
if
[[
`
lsb_release
-i
-s
`
==
'Ubuntu'
]]
;
then
apt-get-install linux-image-extra-
$(
uname
-r
)
linux-image-extra-virtual
fi
# Install aufs tools
# Install aufs tools
apt-get-install aufs-tools
apt-get-install aufs-tools
...
@@ -188,6 +190,9 @@ else
...
@@ -188,6 +190,9 @@ else
fi
fi
if
[[
-n
"
${
move_docker
}
"
]]
;
then
if
[[
-n
"
${
move_docker
}
"
]]
;
then
# Stop docker if it is running, so we can move its files
systemctl stop docker
||
true
# Move docker to e.g. /mnt
# Move docker to e.g. /mnt
# but only if it is a directory, not a symlink left over from a previous run
# but only if it is a directory, not a symlink left over from a previous run
if
[[
-d
/var/lib/docker
]]
;
then
if
[[
-d
/var/lib/docker
]]
;
then
...
...
cluster/cloudimages/k8s-ebs-jessie-amd64-hvm.yml
View file @
cbcc2580
...
@@ -77,6 +77,13 @@ plugins:
...
@@ -77,6 +77,13 @@ plugins:
# Install python-pip
# Install python-pip
-
[
'
chroot'
,
'
{root}'
,
'
pip'
,
'
install'
,
'
awscli'
]
-
[
'
chroot'
,
'
{root}'
,
'
pip'
,
'
install'
,
'
awscli'
]
# Install docker 1.9.1
-
[
'
wget'
,
'
http://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.9.1-0~jessie_amd64.deb'
,
'
-O'
,
'
{root}/tmp/docker.deb'
]
-
[
'
/bin/sh'
,
'
-c'
,
'
cd
{root}/tmp;
echo
"c58c39008fd6399177f6b2491222e4438f518d78
docker.deb"
|
shasum
-c
-'
]
-
[
'
chroot'
,
'
{root}'
,
'
/bin/sh'
,
'
-c'
,
'
DEBIAN_FRONTEND=noninteractive
apt-get
install
--no-install-recommends
--assume-yes
libapparmor1'
]
-
[
'
chroot'
,
'
{root}'
,
'
/bin/sh'
,
'
-c'
,
'
DEBIAN_FRONTEND=noninteractive
dpkg
--install
/tmp/docker.deb'
]
-
[
'
rm'
,
'
{root}/tmp/docker.deb'
]
# We perform a full replacement of some grub conf variables:
# We perform a full replacement of some grub conf variables:
# GRUB_CMDLINE_LINUX_DEFAULT (add memory cgroup)
# GRUB_CMDLINE_LINUX_DEFAULT (add memory cgroup)
# GRUB_TIMEOUT (remove boot delay)
# GRUB_TIMEOUT (remove boot delay)
...
...
cluster/saltbase/salt/docker/init.sls
View file @
cbcc2580
...
@@ -208,6 +208,16 @@ net.ipv4.ip_forward:
...
@@ -208,6 +208,16 @@ net.ipv4.ip_forward:
{% set override_deb_sha1='' %}
{% set override_deb_sha1='' %}
{% set override_docker_ver='' %}
{% set override_docker_ver='' %}
{% elif grains.get('cloud', '') == 'aws'
and grains.get('os_family', '') == 'Debian'
and grains.get('oscodename', '') == 'jessie' -%}
# TODO: Get from google storage?
{% set docker_pkg_name='docker-engine' %}
{% set override_docker_ver='1.9.1-0~jessie' %}
{% set override_deb='docker-engine_1.9.1-0~jessie_amd64.deb' %}
{% set override_deb_url='http://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.9.1-0~jessie_amd64.deb' %}
{% set override_deb_sha1='c58c39008fd6399177f6b2491222e4438f518d78' %}
# Ubuntu presents as os_family=Debian, osfullname=Ubuntu
# Ubuntu presents as os_family=Debian, osfullname=Ubuntu
{% elif grains.get('cloud', '') == 'aws'
{% elif grains.get('cloud', '') == 'aws'
and grains.get('os_family', '') == 'Debian'
and grains.get('os_family', '') == 'Debian'
...
...
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