Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

As we have started using AWS cloud for Bahmni SAAS, We have to enable developers to be aware about various AWS & Kubernetes functionalities.
In the same phase, we are providing AWS CLI access for our Development team.

This will help us to debug, troubleshoot & see the deployed services in the form of Pods, Deployment, services. You can also view the logs of individuals pods to debug better.
Kubernetes commands which will help you.

Request you all to follow the below steps to setup AWS CLI on your machine.


Step 1: Install AWS CLI & Kubectl on your machine

- aws
brew install awscli

- kubectl:
brew install kubectl

OR 

curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.23.6/bin/darwin/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl

NOTE: If doing it for first time, It will take sometime to install dependencies.

Step 2: Execute below command to configure the AWS Credentials shared to you by Infra folks.

aws configure

This will ask you for inputs for access key, secret key, region & output format.

access key —> Shared over slack
secret key —> Shared over slack
region ——> ap-south-1
output format ——> [NO INPUTS NEEDED, JUST PRESS ENTER & MOVE AHEAD]

This credential will be saved as default.

Where are configuration settings stored?
You can see the details using below commands:

cat ~/.aws/credentials
cat ~/.aws/config

Step 3: Copy the below lines in ~/.aws/config

[profile bahmni-eks-developers]
role_arn = arn:aws:iam::863324974761:role/BahmniEKSDeveloperRoleForIAMUsers
source_profile = default


Step 4: To Access Bahmni EKS cluster, set the AWS_PROFILE.

export AWS_PROFILE=bahmni-eks-developers


Step 5: Set the AWS EKS cluster config to map it will the running cluster.
This command is needed to setup the connectivity between your machine(terminal) with AWS EKS cluster.

aws eks update-kubeconfig --name bahmni-cluster-nonprod --region ap-south-1 --profile bahmni-eks-developers


Step 6: To verify you have received access execute the below commands
-n --- Namespaces
Currently we have following namespaces:
- default
- demo
- dev
- monitoring

kubectl get pods -n <namespace>
kubectl get deployments -n <namespace>

If this shows details about the various pods & deployments running.
Attaching the Kubectl commands cheatsheet for your reference.

We are DONE with access now.



Please contact Infra squad (Slack: #bahmni-infra) if you are facing any issues while setting up your AWS CLI Access.



  • No labels