Skip to content

Commit

Permalink
Improved documentation and removed dead code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Rudolph Buhrmann committed Jul 14, 2024
1 parent 0083557 commit 895d6f5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 67 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
>>> V5_1 has been release. Keep on reading. Cluster formation is now much faster and easier to execute. Only five steps
are required to have it up and running.
>>> V5_1 has been released. Cluster formation is now much faster and easier to execute. Only five steps
are required to have it up and running.

# Atomika
```
Expand Down Expand Up @@ -116,6 +116,8 @@ declarations from jetpack/vars.yml:
>ansible-playbook jetpack/deploy.yml -i atomika/inventory/basic_inventory.yml -K
Change inventory file should you not be using the basic inventory.

Enter 'atmin' as sudo password and hit enter to clone without passing a security credential.

Open http://www.demo.io/env1/hello and http://www.demo.io/env2/hello from a browser (or
curl) to see the [Kubernetes Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/)
routing to two different internal Kubernetes services.
Expand Down
12 changes: 0 additions & 12 deletions atomika/copy_kube_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,6 @@
owner: "{{ second_kubectl_user }}"
group: "{{ second_kubectl_user }}"
mode: '0640'
#
# - name: Remove the cache directory for secondary user.
# file:
# path: /home/{{ second_kubectl_user }}/.kube/cache
# state: absent

# - name: Ensuring .bashrc exists for secondary user.
# become: true
# ansible.builtin.file:
# path: /home/{{ second_kubectl_user }}/.bashrc
# state: touch
# mode: '0640'

- name: Configure kubectl command auto-completion for secondary user.
become: true
Expand Down
9 changes: 2 additions & 7 deletions atomika/k8s_ingress_controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
dest: ~/metallb.yaml
mode: '0664'

- name: Apply metallb manifest to the cluster.
- name: Apply MetalLB manifest to the cluster.
kubernetes.core.k8s:
state: present
src: ~/metallb.yaml
Expand Down Expand Up @@ -119,16 +119,11 @@
kubernetes.core.k8s:
state: present
src: ~/address-pool.yml
# become_user: "{{ ansible_user }}"
# become_method: sudo
# command: kubectl apply -f ~/address-pool.yml

- name: Load L2Advertisement
# become_user: "{{ ansible_user }}"
# become_method: sudo

kubernetes.core.k8s:
state: present
src: ~/l2advertisement.yml
# command: kubectl apply -f ~/l2advertisement.yml
...

34 changes: 0 additions & 34 deletions atomika/k8s_join_nodes.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# k8s_join_nodes.yml
---
# add masters into hosts as ip address of k8scp should be changed for main master as well in /etc/hosts
#- hosts: comasters
# remote_user: "{{ ansible_user }}"
# become: yes
# become_method: sudo
# become_user: root
# connection: ssh

- hosts: masters
gather_facts: false
Expand Down Expand Up @@ -75,33 +68,6 @@

- debug:
msg: "{{ joined_or_not.stdout }}"
#
#- hosts: "masters,comasters,workers"
# become: yes
# become_method: sudo
# become_user: root
# gather_facts: yes
# connection: ssh
#
# tasks:
# - name: Add endpoint of haproxy to hosts
# ansible.builtin.import_tasks: internal/i_set_cplb_endpoint.yml
#

#- hosts: "masters,comasters"
# #remote_user: k8s5gc
# #become: yes
# #become_method: sudo
# become_user: root
# gather_facts: yes
# connection: ssh
#
# tasks:
#
# - name: Configure kubectl command auto-completion.
# lineinfile:
# dest: /home/{{ ansible_user }}/.bashrc
# line: 'source <(kubectl completion bash)'
# insertafter: EOF
...

13 changes: 1 addition & 12 deletions atomika/k8s_master_init.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
# k8s_master_init.yml

- hosts: masters
# become: yes
# become_method: sudo
# become_user: root
connection: ssh
vars_prompt:
# TODO rename to secondary_kubectl_user and perhaps reword prompt?
# - name: kubectl_user_temp
# prompt: "Enter the name of the existing user that will execute kubectl commands or press enter when machine only has the bootstrapped ansible account."
# private: no
# default:

tasks:
- name: Initializing Kubernetes Cluster
Expand Down Expand Up @@ -56,12 +48,9 @@
#
# - pause: seconds=30

- name: Switch on scheduling and metallb announcing when no workers in cluster
# become_user: "{{ ansible_user }}"
# become_method: sudo
- name: Switch on scheduling and MetalLB announcing when no workers in cluster
become: true
command: "{{ item }}"
# run_once: true
when: "'workers' not in groups"
with_items:
- kubectl --kubeconfig /etc/kubernetes/admin.conf taint node --all node-role.kubernetes.io/control-plane:NoSchedule-
Expand Down

0 comments on commit 895d6f5

Please sign in to comment.