Skip to content

kalisio/kommando

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kommando

Latest Release License: MIT Download Status

A Terraform solution for provisioning an AWS EC2 instance running Ubuntu for load testing.

Load Testing Pipeline

Prerequisites

1. Install Terraform

  • Guide: Follow the official Terraform Installation instructions.
  • Verification: Run terraform -v to confirm installation.

2. Configure AWS CLI

  • Installation: Install the AWS CLI by following the AWS CLI User Guide.
  • Configuration: Execute the following command and provide your credentials:
    aws configure
    AWS Access Key ID: [Your IAM Access Key]
    AWS Secret Access Key: [Your IAM Secret Key]
    Default region name: eu-west-3
    Default output format: json

3. Create an SSH key pair

aws ec2 create-key-pair --key-name load_testing_keypair --query "KeyMaterial" --output text > "$(pwd)/load_testing_keypair.pem"
chmod 400 ./load_testing_keypair.pem

Setup

1. Set environment variables

Export the required variables in your shell to configure the deployment:

export TF_VAR_development_repo_url="https://oauth2:$GITLAB_IRSN_TOKEN@gitlab.extra.irsn.fr/webteleray/development.git"
export TF_VAR_rclone_config_repo_url="https://oauth2:$GITLAB_IRSN_TOKEN@gitlab.extra.irsn.fr/webteleray/deployment/teleray-staging.git"
export TF_VAR_sops_age_key=$(grep '^AGE-SECRET-KEY-' "$DEVELOPMENT_DIR/age/keys.txt")
export TF_VAR_admin_jwt_access_token="your-jwt-token"

2. Deploy the infrastructure

Initialize and apply the Terraform configuration:

terraform init && terraform plan && terraform apply --auto-approve

Important

Check the public IP with: terraform output instance_ip

3. Verify execution

  • SSH Access: Connect to the instance using:
    ssh -i ./load_testing_keypair.pem ubuntu@<PUBLIC_IP>
  • Check Logs:
    • Setup Script: View the provisioning logs:
      sudo cat /var/log/setup_script.log
    • Docker Container: List running containers and inspect logs:
      sudo docker ps
      sudo docker logs <CONTAINER_ID>

Cleanup

Remove all provisioned resources when testing is complete:

terraform destroy --auto-approve

License

Copyright (c) 2017-20xx Kalisio

Licensed under the MIT license.

Authors

This project is sponsored by

Kalisio

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published