Skip to content

Commit 5c60edc

Browse files
committed
fix(compose): edit some related fields to compose
2 parents 72814e8 + 22255fe commit 5c60edc

File tree

32 files changed

+1897
-294
lines changed

32 files changed

+1897
-294
lines changed

app/directory_generators/ansible_generator.py

Lines changed: 793 additions & 199 deletions
Large diffs are not rendered by default.

app/media/MyAnsible/group_vars/all

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# General
22
install_ansible_modules: "true"
33
disable_transparent_huge_pages: "true"
4+
45
setup_interface: "false"
56

67
# Network Calico see here for more details https://github.com/projectcalico/calico/releases
@@ -28,15 +29,9 @@ k8s_version: "1.31.2" # see here https://kubernetes.io/releases/patch-releases/
2829
# CRI
2930
cri_socket: unix:///var/run/containerd/containerd.sock
3031

31-
# VRRP and HAProxy
32-
interface_name: "enp0s8"
33-
virtual_ip: "192.168.178.100"
34-
haproxy_frontend_password: "password"
35-
3632
# Ansible Connection
37-
3833
ansible_user: root
3934
ansible_port: 22
4035
ansible_python_interpreter: "/usr/bin/python3"
41-
domain="devopsgpt.com"
42-
apiserver_url="devopsgpt.com"
36+
domain: "devopsgpt.com"
37+
apiserver_url: "devopsgpt.com"

app/media/MyAnsible/hosts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[all]
22
string private_ip=x.x.x.x
33
string private_ip=x.x.x.x
4-
string private_ip=x.x.x.x
54

65
[k8s]
76
string
@@ -12,6 +11,3 @@ string
1211

1312
[k8s_workers]
1413
string
15-
16-
[lb]
17-
string

app/media/MyAnsible/kubernetes_playbook.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,35 @@
44
gather_facts: yes
55
any_errors_fatal: true
66
tags: [preinstall]
7+
8+
- hosts: k8s
9+
roles:
10+
- role: k8s
11+
gather_facts: yes
12+
any_errors_fatal: true
13+
tags: [k8s]
14+
15+
- hosts: k8s
16+
roles:
17+
- role: init_k8s
18+
gather_facts: yes
19+
any_errors_fatal: true
20+
tags: [init_k8s]
21+
22+
- hosts: k8s_masters
23+
roles:
24+
- role: preinstall
25+
- role: k8s
26+
- role: join_master
27+
gather_facts: yes
28+
any_errors_fatal: true
29+
tags: [join_master]
30+
31+
- hosts: k8s_workers
32+
roles:
33+
- role: preinstall
34+
- role: k8s
35+
- role: join_worker
36+
gather_facts: yes
37+
any_errors_fatal: true
38+
tags: [join_worker]

app/media/MyAnsible/roles/init_k8s/defaults/main.yml

Whitespace-only changes.

app/media/MyAnsible/roles/init_k8s/files/sample.sh

Whitespace-only changes.

app/media/MyAnsible/roles/init_k8s/handlers/main.yml

Whitespace-only changes.

app/media/MyAnsible/roles/init_k8s/tasks/initk8s.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- name: Init cluster | Initiate cluster on node groups['kube_master'][0]
1515
shell: kubeadm init --config=/root/kubeadmcnf.yaml
1616
register: kubeadm_init
17+
# Retry is because upload config sometimes fails
1718
until: kubeadm_init is succeeded or "field is immutable" in kubeadm_init.stderr
1819
notify: Restart kubelet
1920

@@ -49,12 +50,14 @@
4950
command: reboot
5051
async: 1
5152
poll: 0
53+
# ignore_errors: yes
5254
delegate_to: "{{ groups['k8s_masters'][0] }}"
5355

5456
- name: Sleep for 300 seconds to Master1 up and running
5557
wait_for:
5658
timeout: 300
5759
delegate_to: localhost
60+
# when: use_iran == "true"
5861

5962
- name: Example Task After Reboot
6063
debug:

app/media/MyAnsible/roles/join_master/defaults/main.yml

Whitespace-only changes.

app/media/MyAnsible/roles/join_master/files/join-command

Whitespace-only changes.

0 commit comments

Comments
 (0)