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
9d5da502
Commit
9d5da502
authored
Apr 20, 2015
by
Robert Bailey
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7074 from crossorigin/azure-0.15.0
Update Azure Coreos To Kubernetes 0.15.0
parents
85f4cb99
770479b2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
21 deletions
+94
-21
README.md
docs/getting-started-guides/README.md
+1
-1
kubernetes-cluster-etcd-node-template.yml
...onfig_templates/kubernetes-cluster-etcd-node-template.yml
+40
-8
kubernetes-cluster-main-nodes-template.yml
...nfig_templates/kubernetes-cluster-main-nodes-template.yml
+34
-2
azure_wrapper.js
.../getting-started-guides/coreos/azure/lib/azure_wrapper.js
+6
-4
kubernetes.js
...ed-guides/coreos/azure/lib/deployment_logic/kubernetes.js
+13
-6
No files found.
docs/getting-started-guides/README.md
View file @
9d5da502
...
...
@@ -34,7 +34,7 @@ libvirt/KVM | CoreOS | CoreOS | libvirt/KVM | [docs](../../docs/getting
AWS | Juju | Ubuntu | flannel |
[
docs
](
../../docs/getting-started-guides/juju.md
)
|
[
Community
](
https://github.com/whitmo/bundle-kubernetes
)
(
[@whit](https://github.com/whitmo
)
,
[
@matt
](
https://github.com/mbruzek
)
,
[
@chuck
](
https://github.com/chuckbutler
)
) |
[
Tested
](
http://reports.vapour.ws/charm-tests-by-charm/kubernetes
)
K8s v0.8.1
OpenStack/HPCloud | Juju | Ubuntu | flannel |
[
docs
](
../../docs/getting-started-guides/juju.md
)
|
[
Community
](
https://github.com/whitmo/bundle-kubernetes
)
(
[@whit](https://github.com/whitmo
)
,
[
@matt
](
https://github.com/mbruzek
)
,
[
@chuck
](
https://github.com/chuckbutler
)
) |
[
Tested
](
http://reports.vapour.ws/charm-tests-by-charm/kubernetes
)
K8s v0.8.1
Joyent | Juju | Ubuntu | flannel |
[
docs
](
../../docs/getting-started-guides/juju.md
)
|
[
Community
](
https://github.com/whitmo/bundle-kubernetes
)
(
[@whit](https://github.com/whitmo
)
,
[
@matt
](
https://github.com/mbruzek
)
,
[
@chuck
](
https://github.com/chuckbutler
)
) |
[
Tested
](
http://reports.vapour.ws/charm-tests-by-charm/kubernetes
)
K8s v0.8.1
Azure | CoreOS | CoreOS | Weave |
[
docs
](
../../docs/getting-started-guides/coreos/azure/README.md
)
| Community (
[
@errordeveloper
](
https://github.com/errordeveloper
)
,
[
@squillace
](
https://github.com/squillace
)
,
[
@chanezon
](
https://github.com/chanezon
)
) | Uses K8s version 0.11
.0
Azure | CoreOS | CoreOS | Weave |
[
docs
](
../../docs/getting-started-guides/coreos/azure/README.md
)
| Community (
[
@errordeveloper
](
https://github.com/errordeveloper
)
,
[
@squillace
](
https://github.com/squillace
)
,
[
@chanezon
](
https://github.com/chanezon
)
,
[
@crossorigin
](
https://github.com/crossorigin
)
) | Uses K8s version 0.15
.0
Bare-metal (Offline) | CoreOS | CoreOS | flannel |
[
docs
](
../../docs/getting-started-guides/coreos/bare_metal_offline.md
)
| Community(
[
@jeffbean
](
https://github.com/jeffbean
)
) | K8s v0.10.1
Definition of columns:
...
...
docs/getting-started-guides/coreos/azure/cloud_config_templates/kubernetes-cluster-etcd-node-template.yml
View file @
9d5da502
...
...
@@ -2,16 +2,48 @@
## More specifically, we need to add peer hosts for each but the elected peer.
coreos
:
etcd
:
name
:
etcd
addr
:
$private_ipv4:4001
bind-addr
:
0.0.0.0
peer-addr
:
$private_ipv4:7001
snapshot
:
true
max-retry-attempts
:
50
units
:
-
name
:
etcd.service
-
name
:
download-etcd2.service
enable
:
true
command
:
start
content
:
|
[Unit]
After=network-online.target
Before=etcd2.service
Description=Download etcd2 Binaries
Documentation=https://github.com/coreos/etcd/
Requires=network-online.target
[Service]
Environment=ETCD2_RELEASE_TARBALL=https://github.com/coreos/etcd/releases/download/v2.0.9/etcd-v2.0.9-linux-amd64.tar.gz
ExecStartPre=/bin/mkdir -p /opt/bin
ExecStart=/bin/bash -c "curl --silent --location $ETCD2_RELEASE_TARBALL | tar xzv -C /opt"
ExecStartPost=/bin/ln -s /opt/etcd-v2.0.9-linux-amd64/etcd /opt/bin/etcd2
ExecStartPost=/bin/ln -s /opt/etcd-v2.0.9-linux-amd64/etcdctl /opt/bin/etcdctl2
RemainAfterExit=yes
Type=oneshot
[Install]
WantedBy=multi-user.target
-
name
:
etcd2.service
enable
:
true
command
:
start
content
:
|
[Unit]
After=download-etcd2.service
Description=etcd 2
Documentation=https://github.com/coreos/etcd/
[Service]
Environment=ETCD_NAME=%host%
Environment=ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
Environment=ETCD_INITIAL_ADVERTISE_PEER_URLS=http://%host%:2380
Environment=ETCD_LISTEN_PEER_URLS=http://%host%:2380
Environment=ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379,http://0.0.0.0:4001
Environment=ETCD_INITIAL_CLUSTER=%cluster%
Environment=ETCD_INITIAL_CLUSTER_STATE=new
ExecStart=/opt/bin/etcd2
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
update
:
group
:
stable
reboot-strategy
:
off
docs/getting-started-guides/coreos/azure/cloud_config_templates/kubernetes-cluster-main-nodes-template.yml
View file @
9d5da502
...
...
@@ -18,9 +18,37 @@ write_files:
printf '{ "id": "%s", "kind": "Minion", "apiVersion": "v1beta1", "labels": { "environment": "production" } }' "${minion_id}" \
| /opt/bin/kubectl create -s "${master_url}" -f -
-
path
:
/etc/kubernetes/manifests/fluentd.manifest
permissions
:
'
0755'
owner
:
root
content
:
|
version: v1beta2
id: fluentd-to-elasticsearch
containers:
- name: fluentd-es
image: gcr.io/google_containers/fluentd-elasticsearch:1.3
env:
- name: FLUENTD_ARGS
value: -qq
volumeMounts:
- name: containers
mountPath: /var/lib/docker/containers
- name: varlog
mountPath: /varlog
volumes:
- name: containers
source:
hostDir:
path: /var/lib/docker/containers
- name: varlog
source:
hostDir:
path: /var/log
coreos
:
update
:
group
:
stable
reboot-strategy
:
off
units
:
-
name
:
docker.service
drop-ins
:
...
...
@@ -187,7 +215,7 @@ coreos:
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
Requires=network-online.target
[Service]
Environment=KUBE_RELEASE_TARBALL=https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.1
1
.0/kubernetes.tar.gz
Environment=KUBE_RELEASE_TARBALL=https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.1
5
.0/kubernetes.tar.gz
ExecStartPre=/bin/mkdir -p /opt/
ExecStart=/bin/bash -c "curl --silent --location $KUBE_RELEASE_TARBALL | tar xzv -C /tmp/"
ExecStart=/bin/tar xzvf /tmp/kubernetes/server/kubernetes-server-linux-amd64.tar.gz -C /opt
...
...
@@ -278,12 +306,16 @@ coreos:
Wants=download-kubernetes.service
ConditionHost=!kube-00
[Service]
ExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests/
ExecStart=/opt/kubernetes/server/bin/kubelet \
--address=0.0.0.0 \
--port=10250 \
--hostname_override=%H \
--api_servers=http://kube-00:8080 \
--logtostderr=true
--logtostderr=true \
--cluster_dns=10.1.0.3 \
--cluster_domain=kube.local \
--config=/etc/kubernetes/manifests/
Restart=always
RestartSec=10
[Install]
...
...
docs/getting-started-guides/coreos/azure/lib/azure_wrapper.js
View file @
9d5da502
...
...
@@ -13,9 +13,9 @@ var inspect = require('util').inspect;
var
util
=
require
(
'./util.js'
);
var
coreos_image_ids
=
{
'stable'
:
'2b171e93f07c4903bcad35bda10acf22__CoreOS-Stable-6
07.0
.0'
,
'beta'
:
'2b171e93f07c4903bcad35bda10acf22__CoreOS-Beta-6
12.1
.0'
,
// untested
'alpha'
:
'2b171e93f07c4903bcad35bda10acf22__CoreOS-Alpha-6
26.0.0'
,
// untested
'stable'
:
'2b171e93f07c4903bcad35bda10acf22__CoreOS-Stable-6
33.1
.0'
,
'beta'
:
'2b171e93f07c4903bcad35bda10acf22__CoreOS-Beta-6
47.0
.0'
,
// untested
'alpha'
:
'2b171e93f07c4903bcad35bda10acf22__CoreOS-Alpha-6
47.0.0'
// untested
};
var
conf
=
{};
...
...
@@ -140,7 +140,9 @@ var create_ssh_conf = function () {
};
var
get_location
=
function
()
{
if
(
process
.
env
[
'AZ_LOCATION'
])
{
if
(
process
.
env
[
'AZ_AFFINITY'
])
{
return
'--affinity-group='
+
process
.
env
[
'AZ_AFFINITY'
];
}
else
if
(
process
.
env
[
'AZ_LOCATION'
])
{
return
'--location='
+
process
.
env
[
'AZ_LOCATION'
];
}
else
{
return
'--location=West Europe'
;
...
...
docs/getting-started-guides/coreos/azure/lib/deployment_logic/kubernetes.js
View file @
9d5da502
var
_
=
require
(
'underscore'
);
_
.
mixin
(
require
(
'underscore.string'
).
exports
());
var
util
=
require
(
'../util.js'
);
var
cloud_config
=
require
(
'../cloud_config.js'
);
exports
.
create_etcd_cloud_config
=
function
(
node_count
,
conf
)
{
var
elected_node
=
0
;
var
input_file
=
'./cloud_config_templates/kubernetes-cluster-etcd-node-template.yml'
;
var
peers
=
[
];
for
(
var
i
=
0
;
i
<
node_count
;
i
++
)
{
peers
.
push
(
util
.
hostname
(
i
,
'etcd'
)
+
'=http://'
+
util
.
hostname
(
i
,
'etcd'
)
+
':2380'
);
}
var
cluster
=
peers
.
join
(
','
);
return
_
(
node_count
).
times
(
function
(
n
)
{
var
output_file
=
util
.
join_output_file_path
(
'kubernetes-cluster-etcd-node-'
+
n
,
'generated.yml'
);
return
cloud_config
.
process_template
(
input_file
,
output_file
,
function
(
data
)
{
if
(
n
!==
elected_node
)
{
data
.
coreos
.
etcd
.
peers
=
[
util
.
hostname
(
elected_node
,
'etcd'
),
7001
].
join
(
':'
);
for
(
var
i
=
0
;
i
<
data
.
coreos
.
units
.
length
;
i
++
)
{
var
unit
=
data
.
coreos
.
units
[
i
];
if
(
unit
.
name
===
'etcd2.service'
)
{
unit
.
content
=
_
.
replaceAll
(
_
.
replaceAll
(
unit
.
content
,
'%host%'
,
util
.
hostname
(
n
,
'etcd'
)),
'%cluster%'
,
cluster
);
break
;
}
}
return
data
;
});
...
...
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