-
Notifications
You must be signed in to change notification settings - Fork 9
k8s env setup guide and script #128
base: main
Are you sure you want to change the base?
Conversation
# config file for ansible -- https://ansible.com/ | ||
# =============================================== | ||
|
||
# nearly all parameters can be overridden in ansible-playbook | ||
# or with command line flags. ansible will read ANSIBLE_CONFIG, | ||
# ansible.cfg in the current working directory, .ansible.cfg in | ||
# the home directory or /etc/ansible/ansible.cfg, whichever it | ||
# finds first | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yanmo96 Does this file require? or is this file created by the ansible package installation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file won't be generate by default when instal ansible.
I put this file here in case for large scale deployment, so we can adjust how many machines we can do concurrently to speed up the process. (by default is 6, but we change change to 50 or more)
aws ec2 describe-instances \ | ||
--filters \ | ||
"Name=instance-state-name,Values=running" \ | ||
"Name=tag:Name,Values=ym-250-4" \ | ||
--query 'Reservations[*].Instances[*].[PrivateIpAddress]' \ | ||
--output text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yanmo96 What is this file for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used to get list of aws ec2 we created with name as filter, so we can then put them into the ansible host much faster than click on the webpage one by one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yanmo96 Please make a comment in front of the file to describe what's the purpose of this file.
`ansible-playbook -i aws-host kube-dependencies.yml` | ||
|
||
After the above command, run the follow to init k8s on the master node: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yanmo96 Explain what is aws-host
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aws-host is a file with a list of hosts and their config for ansbile to run on. I can change the name to just hosts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yanmo96 yes, please change it to hosts.
@yanmo96 Please add license header to all files. |
Added the ansible scripts to set up k8s and dependencies.
Added in Readme of steps take to install all dependencies for Merak and how to deploy Alcor.
This is the link to Readme: https://github.com/yanmo96/merak/tree/env_deployment_setup/deployments/env_setup/kube-cluster