Skip to content
Snippets Groups Projects
Commit ba111a58 authored by r0zehnal0vak's avatar r0zehnal0vak
Browse files

modified readme + requirements

parent c2c1a254
No related branches found
No related tags found
1 merge request!1updated README.md
......@@ -3,77 +3,53 @@
- ansible - [install](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#pip-install) (2.14.0 < ansible version < 2.15.0 required)</br>
- Form to access group project - https://projects.cloud.muni.cz/
## 1. group project (quotas?)
Request project via [form](https://projects.cloud.muni.cz/).
## Terrraform
## 2. create openstack application credentials
- On tab Identity > Application Credentials
- \+ Create Application Credential
Create openstack application credentials: </br>
- On tab Identity > application credentials
- \+ create application credential
- Give a name > Create Applicaiton Credential
- Download file! (The application credential secret will not be available after closing this page, so you must capture it now or download it. If you lose this secret, you must generate a new application credential)
## 3. git clone kubernetes-infra-example
```
git clone git@gitlab.ics.muni.cz:cloud/kubernetes/kubernetes-infra-example.git
```
## 4. application credential -> group_vars
If required you may change the values as needed. (like infrastructure name, cluster size (master nodes, worker nodes groups), etc.)
## 5. terraform - main - values
- /kubernetes-infra-example/terraform/main.tf
If required you may change the values as needed. (like infrastructure name, cluster size (master nodes, worker nodes groups), etc.)</br>
- <code>~/kubernetes-infra-example/terraform/main.tf</code>
- Give a path to your public ssh key at: <code>ssh_public_key = "~/.ssh/id_rsa.pub"</code>
## 6. source application credentials
```
cd ~/kubernetes-infra-example/terraform/
terraform init
source ~/Downloads/app-cred-credential_test-openrc.sh
```
## 7. terraform apply
```
source ~/path/to/credentials.sh
terraform apply
```
## 8. ansible/ group_vars (all possible group vars are in kubespray project)
- cd ../ansible
- Modify values
- cd /group_vars
## Kubespray
## 9. application credential -> group_vars -> all -> openstack
- cd ~/kubernetes-infra-example/ansible/group_vars/all/
- In openstack.yml modify the application credentials, can be the same credentials as already created.
- <code>cd ~/kubernetes-infra-example/ansible/group_vars/all/</code>
- In <code>openstack.yml</code> modify the application credentials, can be the same credentials as already created.
## 10. Install Kubernetes
### Prerequisites:
#### Install Kubernetes
Prerequisites: </br>
- ([Kubespray](https://github.com/kubernetes-sigs/kubespray))
```
cd ~/kubernetes-infra-example/ansible/01-playbook/
ansible-galaxy install -r requirements.yml
git clone https://github.com/kubernetes-sigs/kubespray.git
cd kubespray
sudo pip install -r requirements.txt
```
### Run ansible playbook:
Run ansible playbook: </br>
```
cd ~/kubernetes-infra-example/ansible/01-playbook/
ansible-playbook -i ~/kubernetes-infra-example/ansible/ansible_inventory --user=ubuntu --become --become-user=root play.yml
```
<!--
3. Access via SSH
- Bastion ansible_hosts at ~/kubernetes-infra-example/ansible/ansible_inventory
- ssh -J ubuntu@195.113.167.169 ubuntu@10.10.10.226
- sudo -i
- kubectl get nodes
-->
<!--
odkazy:
- main https://gitlab.ics.muni.cz/cloud/kubernetes/kubernetes-infra-example
- terraform infrastructure https://gitlab.ics.muni.cz/cloud/kubernetes/terraform-openstack-dev
- kubespray and ansible installation https://gitlab.ics.muni.cz/cloud/knowledgebase/-/blob/master/howtos/kubespray-deployment-in-openstack.md
cíl: kubectl get nodes a dostat output
-->
#### Access with SSH </br>
- Bastion ansible_hosts at <code>~/kubernetes-infra-example/ansible/ansible_inventory</code>
```
ssh -J ubuntu@195.113.167.169 ubuntu@10.10.10.26
sudo -i
kubectl get nodes
```
\ No newline at end of file
ansible==8.5.0
cryptography==41.0.4
jinja2==3.1.2
jmespath==1.0.1
MarkupSafe==2.1.3
netaddr==0.9.0
pbr==5.11.1
ruamel.yaml==0.17.35
ruamel.yaml.clib==0.2.8
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment