39 changed files with 416 additions and 146 deletions
Split View
Diff Options
-
3Vagrantfile
-
6cluster.yml
-
27contrib/aws_iam/kubernetes-master-policy.json
-
10contrib/aws_iam/kubernetes-master-role.json
-
45contrib/aws_iam/kubernetes-minion-policy.json
-
10contrib/aws_iam/kubernetes-minion-role.json
-
22docs/atomic.md
-
2docs/aws.md
-
1docs/vars.md
-
2inventory/group_vars/all.yml
-
10roles/bootstrap-os/tasks/main.yml
-
8roles/docker/tasks/main.yml
-
9roles/docker/tasks/systemd.yml
-
2roles/docker/templates/docker-dns.conf.j2
-
2roles/docker/templates/docker-options.conf.j2
-
38roles/docker/templates/docker_atomic.service.j2
-
3roles/etcd/defaults/main.yml
-
2roles/etcd/meta/main.yml
-
73roles/etcd/tasks/check_certs.yml
-
45roles/etcd/tasks/gen_certs_script.yml
-
9roles/etcd/tasks/install_host.yml
-
18roles/etcd/tasks/main.yml
-
2roles/kernel-upgrade/tasks/main.yml
-
2roles/kubernetes/master/templates/manifests/kube-apiserver.manifest.j2
-
6roles/kubernetes/master/templates/manifests/kube-controller-manager.manifest.j2
-
2roles/kubernetes/node/templates/kubelet.j2
-
4roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2
-
16roles/kubernetes/preinstall/defaults/main.yml
-
1roles/kubernetes/preinstall/meta/main.yml
-
2roles/kubernetes/preinstall/tasks/etchosts.yml
-
37roles/kubernetes/preinstall/tasks/main.yml
-
14roles/kubernetes/preinstall/tasks/set_facts.yml
-
21roles/kubernetes/preinstall/tasks/vsphere-credential-check.yml
-
20roles/kubernetes/preinstall/templates/vsphere-cloud-config.j2
-
67roles/kubernetes/secrets/tasks/check-certs.yml
-
4roles/kubernetes/secrets/tasks/gen_certs_script.yml
-
7roles/kubernetes/secrets/tasks/main.yml
-
4roles/vault/tasks/main.yml
-
6upgrade-cluster.yml
@ -0,0 +1,27 @@ |
|||
{ |
|||
"Version": "2012-10-17", |
|||
"Statement": [ |
|||
{ |
|||
"Effect": "Allow", |
|||
"Action": ["ec2:*"], |
|||
"Resource": ["*"] |
|||
}, |
|||
{ |
|||
"Effect": "Allow", |
|||
"Action": ["elasticloadbalancing:*"], |
|||
"Resource": ["*"] |
|||
}, |
|||
{ |
|||
"Effect": "Allow", |
|||
"Action": ["route53:*"], |
|||
"Resource": ["*"] |
|||
}, |
|||
{ |
|||
"Effect": "Allow", |
|||
"Action": "s3:*", |
|||
"Resource": [ |
|||
"arn:aws:s3:::kubernetes-*" |
|||
] |
|||
} |
|||
] |
|||
} |
@ -0,0 +1,10 @@ |
|||
{ |
|||
"Version": "2012-10-17", |
|||
"Statement": [ |
|||
{ |
|||
"Effect": "Allow", |
|||
"Principal": { "Service": "ec2.amazonaws.com"}, |
|||
"Action": "sts:AssumeRole" |
|||
} |
|||
] |
|||
} |
@ -0,0 +1,45 @@ |
|||
{ |
|||
"Version": "2012-10-17", |
|||
"Statement": [ |
|||
{ |
|||
"Effect": "Allow", |
|||
"Action": "s3:*", |
|||
"Resource": [ |
|||
"arn:aws:s3:::kubernetes-*" |
|||
] |
|||
}, |
|||
{ |
|||
"Effect": "Allow", |
|||
"Action": "ec2:Describe*", |
|||
"Resource": "*" |
|||
}, |
|||
{ |
|||
"Effect": "Allow", |
|||
"Action": "ec2:AttachVolume", |
|||
"Resource": "*" |
|||
}, |
|||
{ |
|||
"Effect": "Allow", |
|||
"Action": "ec2:DetachVolume", |
|||
"Resource": "*" |
|||
}, |
|||
{ |
|||
"Effect": "Allow", |
|||
"Action": ["route53:*"], |
|||
"Resource": ["*"] |
|||
}, |
|||
{ |
|||
"Effect": "Allow", |
|||
"Action": [ |
|||
"ecr:GetAuthorizationToken", |
|||
"ecr:BatchCheckLayerAvailability", |
|||
"ecr:GetDownloadUrlForLayer", |
|||
"ecr:GetRepositoryPolicy", |
|||
"ecr:DescribeRepositories", |
|||
"ecr:ListImages", |
|||
"ecr:BatchGetImage" |
|||
], |
|||
"Resource": "*" |
|||
} |
|||
] |
|||
} |
@ -0,0 +1,10 @@ |
|||
{ |
|||
"Version": "2012-10-17", |
|||
"Statement": [ |
|||
{ |
|||
"Effect": "Allow", |
|||
"Principal": { "Service": "ec2.amazonaws.com"}, |
|||
"Action": "sts:AssumeRole" |
|||
} |
|||
] |
|||
} |
@ -0,0 +1,22 @@ |
|||
Atomic host bootstrap |
|||
===================== |
|||
|
|||
Atomic host testing has been done with the network plugin flannel. Change the inventory var `kube_network_plugin: flannel`. |
|||
|
|||
Note: Flannel is the only plugin that has currently been tested with atomic |
|||
|
|||
### Vagrant |
|||
|
|||
* For bootstrapping with Vagrant, use box centos/atomic-host |
|||
* Update VagrantFile variable `local_release_dir` to `/var/vagrant/temp`. |
|||
* Update `vm_memory = 2048` and `vm_cpus = 2` |
|||
* Networking on vagrant hosts has to be brought up manually once they are booted. |
|||
|
|||
``` |
|||
vagrant ssh |
|||
sudo /sbin/ifup enp0s8 |
|||
``` |
|||
|
|||
* For users of vagrant-libvirt download qcow2 format from https://wiki.centos.org/SpecialInterestGroup/Atomic/Download/ |
|||
|
|||
Then you can proceed to [cluster deployment](#run-deployment) |
@ -1,2 +1,2 @@ |
|||
[Service] |
|||
Environment="DOCKER_OPTS={% if docker_options is defined %}{{ docker_options }}{% endif %}" |
|||
Environment="DOCKER_OPTS={% if docker_options is defined %}{{ docker_options }}{% endif %}" |
@ -0,0 +1,38 @@ |
|||
[Unit] |
|||
Description=Docker Application Container Engine |
|||
Documentation=http://docs.docker.com |
|||
After=network.target |
|||
Wants=docker-storage-setup.service |
|||
|
|||
[Service] |
|||
Type=notify |
|||
NotifyAccess=all |
|||
EnvironmentFile=-/etc/sysconfig/docker |
|||
EnvironmentFile=-/etc/sysconfig/docker-storage |
|||
EnvironmentFile=-/etc/sysconfig/docker-network |
|||
Environment=GOTRACEBACK=crash |
|||
Environment=DOCKER_HTTP_HOST_COMPAT=1 |
|||
Environment=PATH=/usr/libexec/docker:/usr/bin:/usr/sbin |
|||
ExecReload=/bin/kill -s HUP $MAINPID |
|||
Delegate=yes |
|||
KillMode=process |
|||
ExecStart=/usr/bin/dockerd-current \ |
|||
--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \ |
|||
--default-runtime=docker-runc \ |
|||
--exec-opt native.cgroupdriver=systemd \ |
|||
--userland-proxy-path=/usr/libexec/docker/docker-proxy-current \ |
|||
$DOCKER_OPTS \ |
|||
$DOCKER_STORAGE_OPTIONS \ |
|||
$DOCKER_NETWORK_OPTIONS \ |
|||
$DOCKER_DNS_OPTIONS \ |
|||
$ADD_REGISTRY \ |
|||
$BLOCK_REGISTRY \ |
|||
$INSECURE_REGISTRY |
|||
LimitNOFILE=1048576 |
|||
LimitNPROC=1048576 |
|||
LimitCORE=infinity |
|||
TimeoutStartSec=1min |
|||
Restart=on-abnormal |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
@ -1,9 +0,0 @@ |
|||
--- |
|||
- name: Install | Copy etcd binary from downloaddir |
|||
command: rsync -piu "{{ etcd_bin_dir }}/etcd" "{{ bin_dir }}/etcd" |
|||
register: etcd_copy |
|||
changed_when: false |
|||
|
|||
- name: Install | Copy etcdctl binary from downloaddir |
|||
command: rsync -piu "{{ etcd_bin_dir }}/etcdctl" "{{ bin_dir }}/etcdctl" |
|||
changed_when: false |
@ -0,0 +1,21 @@ |
|||
- name: check vsphere environment variables |
|||
fail: |
|||
msg: "{{ item.name }} is missing" |
|||
when: item.value is not defined or item.value == '' |
|||
with_items: |
|||
- name: vsphere_vcenter_ip |
|||
value: "{{ vsphere_vcenter_ip }}" |
|||
- name: vsphere_vcenter_port |
|||
value: "{{ vsphere_vcenter_port }}" |
|||
- name: vsphere_user |
|||
value: "{{ vsphere_user }}" |
|||
- name: vsphere_password |
|||
value: "{{ vsphere_password }}" |
|||
- name: vsphere_datacenter |
|||
value: "{{ vsphere_datacenter }}" |
|||
- name: vsphere_datastore |
|||
value: "{{ vsphere_datastore }}" |
|||
- name: vsphere_working_dir |
|||
value: "{{ vsphere_working_dir }}" |
|||
- name: vsphere_insecure |
|||
value: "{{ vsphere_insecure }}" |
@ -0,0 +1,20 @@ |
|||
[Global] |
|||
datacenter = {{ vsphere_datacenter }} |
|||
datastore = {{ vsphere_datastore }} |
|||
insecure-flag = {{ vsphere_insecure }} |
|||
password = {{ vsphere_password }} |
|||
port = {{ vsphere_vcenter_port }} |
|||
server = {{ vsphere_vcenter_ip }} |
|||
user = {{ vsphere_user }} |
|||
working-dir = {{ vsphere_working_dir }} |
|||
{% if vsphere_vm_uuid is defined %} |
|||
vm-uuid = {{ vsphere_vm_uuid }} |
|||
{% endif %} |
|||
|
|||
[Disk] |
|||
scsicontrollertype = {{ vsphere_scsi_controller_type }} |
|||
|
|||
{% if vsphere_public_network is defined and vsphere_public_network != "" %} |
|||
[Network] |
|||
public-network = {{ vsphere_public_network }} |
|||
{% endif %} |
Write
Preview
Loading…
Cancel
Save