Skip to content

[WIP] add eks using commons #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 60 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ inputs:
description: 'Set this to true if you want not to use a certificate in the ELB.'
required: false

# Deployment Mode: EKS
deploy_mode:
description: "The name of the deployment environment"
required: false
default: single-vm
aws_eks_foo:
description: example input param to TF
default: gha-repo

outputs:
vm_url:
description: 'The URL of the generated app'
Expand All @@ -102,9 +111,59 @@ runs:
if: ${{ inputs.checkout == 'true' }}
uses: actions/checkout@v3

- name: Deploy with BitOps
- name: Deploy EKS with BitOps
id: deploy-eks
uses: bitovi/github-actions-commons@eks
if: ${{ inputs.deploy_mode == 'eks' }}
with:
# Current repo vars
gh_action_repo: ${{ github.action_path }}

# Action main inputs
bitops_extra_env_vars: -e ST2_AUTH_USERNAME=${{ inputs.st2_auth_username }} -e ST2_AUTH_PASSWORD=${{ inputs.st2_auth_password }}
# bitops_extra_env_vars_file: extra_env
checkout: ${{ inputs.checkout }}
tf_stack_destroy: ${{ inputs.tf_stack_destroy }}
tf_state_bucket: ${{ inputs.tf_state_bucket }}
tf_state_bucket_destroy: ${{ inputs.tf_state_bucket_destroy }}
tf_state_bucket_provider: 'aws'

# TODO
# helm_skip : ${{ inputs.infrastructure_only }}

# AWS - ALL CHECK
aws_access_key_id: ${{ inputs.aws_access_key_id }}
aws_secret_access_key: ${{ inputs.aws_secret_access_key }}
aws_session_token: ${{ inputs.aws_session_token }}
aws_default_region: ${{ inputs.aws_default_region }}
aws_resource_identifier: ${{ inputs.aws_resource_identifier }}
aws_additional_tags: ${{ inputs.aws_extra_tags }}

# # AWS Route53 Domains abd Certificates
# aws_r53_enable: true
# aws_r53_domain_name: ${{ inputs.aws_domain_name }}
# aws_r53_sub_domain_name: ${{ inputs.aws_sub_domain }}
# aws_r53_root_domain_deploy: ${{ inputs.aws_root_domain }}
# aws_r53_enable_cert: ${{ steps.set-cert.outputs.enable_cert }}
# aws_r53_cert_arn: ${{ inputs.aws_cert_arn }}
# aws_r53_create_root_cert: ${{ inputs.aws_create_root_cert }}
# aws_r53_create_sub_cert: ${{ inputs.aws_create_sub_cert }}

# # AWS ELB
# aws_elb_create: true
# aws_elb_app_port: "443"
# aws_elb_app_protocol: ssl
# aws_elb_healthcheck: "HTTPS:443/"


# AWS EKS
aws_eks_foo: ${{ inputs.aws_eks_foo }}
aws_eks_create: true

- name: Deploy single-vm with BitOps
id: deploy
shell: bash
if: ${{ inputs.deploy_mode == 'single-vm' }}
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}
BITOPS_ENVIRONMENT: deployment
Expand Down