Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

k8s env setup guide and script #128

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

yanmo96
Copy link
Contributor

@yanmo96 yanmo96 commented Sep 27, 2022

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

@yanmo96 yanmo96 self-assigned this Sep 27, 2022
@yanmo96 yanmo96 added documentation Improvements or additions to documentation deployment deployment related issues labels Oct 14, 2022
@yanmo96 yanmo96 changed the title Don't merge yet. k8s env setup guide and script k8s env setup guide and script Oct 14, 2022
@yanmo96 yanmo96 requested a review from cj-chung October 14, 2022 18:06
Comment on lines +1 to +9
# 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

Copy link
Contributor

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?

Copy link
Contributor Author

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)

Comment on lines +1 to +6
aws ec2 describe-instances \
--filters \
"Name=instance-state-name,Values=running" \
"Name=tag:Name,Values=ym-250-4" \
--query 'Reservations[*].Instances[*].[PrivateIpAddress]' \
--output text
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

Comment on lines +28 to +30
`ansible-playbook -i aws-host kube-dependencies.yml`

After the above command, run the follow to init k8s on the master node:
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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.

@cj-chung
Copy link
Contributor

@yanmo96 Please add license header to all files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
deployment deployment related issues documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants