Skip to content

Commit

Permalink
AWS EKS formula documentation and helpers update
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeedroza committed Sep 10, 2021
1 parent e68a79a commit ba42af0
Show file tree
Hide file tree
Showing 14 changed files with 79 additions and 39 deletions.
17 changes: 12 additions & 5 deletions vkpr/aws/eks/deploy/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Description

Formula description
Create a Cluster EKS in AWS with [Gitops Terraform Module](https://gitlab.com/vkpr/terraform-aws-eks).

## Command
## Commands

Interactive inputs:

```bash
rit vkpr aws eks deploy
vkpr aws eks deploy
```

## Requirements
Non-interactive:

```bash
rit set credential --fields="token,username" --provider="gitlab" --values="<your-gitlab-token>,<your-gitlab-username>"
vkpr aws eks deploy
```

## Demonstration
**Note**: If you set the credentials of gitlab in formula `vkpr aws eks up`, you dont need to set again.
1 change: 0 additions & 1 deletion vkpr/aws/eks/deploy/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"dockerImageBuilder": "ritclizup/rit-shell-bat-builder",
"inputs": [
{
"name": "gitlab_token",
Expand Down
4 changes: 4 additions & 0 deletions vkpr/aws/eks/deploy/help.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"short": "Deploy AWS EKS with Gitops",
"long": "Deploy the AWS EKS by your Gitlab CI Pipeline. The KUBECONFIG will be in the Artifacts on the pipeline."
}
13 changes: 4 additions & 9 deletions vkpr/aws/eks/deploy/src/main.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#!/bin/bash

if [ ! -d ~/.vkpr/global ]; then
echo "Doesn't initializated the vkpr... Call again the function"
rit vkpr init
exit;
fi
VKPR_SCRIPTS=~/.vkpr/src

source ~/.vkpr/global/log.sh
source ~/.vkpr/global/var.sh
source ~/.vkpr/global/.env
source ~/.vkpr/global/helper.sh
source $VKPR_SCRIPTS/log.sh
source $VKPR_SCRIPTS/var.sh
source $VKPR_SCRIPTS/helper.sh

# shellcheck source=/dev/null
. "$(dirname "$0")"/unix/formula/formula.sh --source-only
Expand Down
12 changes: 5 additions & 7 deletions vkpr/aws/eks/destroy/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Description

Formula description
Destroy the EKS in AWS.

## Command
## Commands

Non-interactive:

```bash
rit vkpr aws eks destroy
vkpr aws eks destroy
```

## Requirements

## Demonstration
1 change: 0 additions & 1 deletion vkpr/aws/eks/destroy/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"dockerImageBuilder": "ritclizup/rit-shell-bat-builder",
"inputs": [
{
"name": "gitlab_token",
Expand Down
4 changes: 4 additions & 0 deletions vkpr/aws/eks/destroy/help.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"short": "Destroy the AWS EKS",
"long": "Destroy the AWS EKS by your Gitlab CI Pipeline."
}
6 changes: 6 additions & 0 deletions vkpr/aws/eks/destroy/src/main.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash

VKPR_SCRIPTS=~/.vkpr/src

source $VKPR_SCRIPTS/log.sh
source $VKPR_SCRIPTS/var.sh
source $VKPR_SCRIPTS/helper.sh

# shellcheck source=/dev/null
. "$(dirname "$0")"/unix/formula/formula.sh --source-only

Expand Down
4 changes: 4 additions & 0 deletions vkpr/aws/eks/help.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"short": "Manage AWS EKS",
"long": "Amazon Elastic Kubernetes Service (Amazon EKS) gives you the flexibility to start, run, and scale Kubernetes applications in the AWS Cloud or on-premises."
}
36 changes: 31 additions & 5 deletions vkpr/aws/eks/up/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,39 @@
# Description

Formula description
Fork the project from [Gitops EKS](https://gitlab.com/vkpr/aws-eks) and run the pipeline to build the terraform config.

## Command
## Commands

Interactive inputs:

```bash
rit vkpr aws eks up
vkpr aws eks up
```

## Requirements
Non-interactive:

```bash
rit set credential --fields="accesskeyid,secretaccesskey" --provider="aws" --values="<your-access-key-id>,<your-secret-access-key>"
rit set credential --fields="token,username" --provider="gitlab" --values="<your-gitlab-token>,<your-gitlab-username>"
vkpr aws eks up --aws_region="us-east-1"
```

```bash
vkpr aws eks up --default
```

## Demonstration
## Parameters

```bash
--aws_region= Define the region to create the EKS. Default: us-east-1
--default= Set all values with default.
```

## Globals File Parameters

```yaml
global:
aws:
eks:
aws_region: <String>
```
1 change: 0 additions & 1 deletion vkpr/aws/eks/up/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"dockerImageBuilder": "ritclizup/rit-shell-bat-builder",
"inputs": [
{
"name": "aws_access_key",
Expand Down
4 changes: 4 additions & 0 deletions vkpr/aws/eks/up/help.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"short": "Build AWS EKS with Gitops",
"long": "Build the terraform module in your Gitlab CI Pipeline forked by a AWS EKS project."
}
2 changes: 1 addition & 1 deletion vkpr/aws/eks/up/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
"eks",
"up"
]
}
}
13 changes: 4 additions & 9 deletions vkpr/aws/eks/up/src/main.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#!/bin/bash

if [ ! -d ~/.vkpr/global ]; then
echo "Doesn't initializated the vkpr... Call again the function"
rit vkpr init
exit;
fi
VKPR_SCRIPTS=~/.vkpr/src

source ~/.vkpr/global/log.sh
source ~/.vkpr/global/var.sh
source ~/.vkpr/global/helper.sh
source ~/.vkpr/global/.env
source $VKPR_SCRIPTS/log.sh
source $VKPR_SCRIPTS/var.sh
source $VKPR_SCRIPTS/helper.sh

# shellcheck source=/dev/null
. "$(dirname "$0")"/unix/formula/formula.sh --source-only
Expand Down

0 comments on commit ba42af0

Please sign in to comment.