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

updated README.md

parent ebfbf89b
No related branches found
No related tags found
1 merge request!1updated README.md
Prerequisites: ## Prerequisites:
terraform - terraform - [install](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)</br>
- 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/
pip requirments.txt ## 1. group project (quotas?)
Request project via [form](https://projects.cloud.muni.cz/).
## 2. create openstack application credentials
- 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
- 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
```
terraform apply
```
## 8. ansible/ group_vars (all possible group vars are in kubespray project)
- cd ../ansible
- Modify values
- cd /group_vars
## 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.
## 10. Install Kubernetes
### Prerequisites:
```
cd ~/kubernetes-infra-example/ansible/01-playbook/
ansible-galaxy install -r requirements.yml 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:
```
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
-->
1. group project (quotas?) <!--
1. create openstack application credentials odkazy:
1. git clone kubernetes-infra-example - main https://gitlab.ics.muni.cz/cloud/kubernetes/kubernetes-infra-example
1. application credential -> group_vars - terraform infrastructure https://gitlab.ics.muni.cz/cloud/kubernetes/terraform-openstack-dev
1. terraform - main - values - kubespray and ansible installation https://gitlab.ics.muni.cz/cloud/knowledgebase/-/blob/master/howtos/kubespray-deployment-in-openstack.md
1. source application credentials cíl: kubectl get nodes a dostat output
1. terraform apply -->
1. ansible/ group_vars (all possible group vars are in kubespray project)
1. application credential -> group_vars -> all -> openstack
2. Install Kubernetes - ansible-playbook -i ~/kubernetes-example/ansible/ansible_inventory --user=ubuntu --become --become-user=root play.yml
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment