preparation

Procedure

  1. Clone the repository with the terraform code. Credentials to authenticate:

    Username: nopass.guest02
    Password: Cvsg25xE@r
    $ git clone http://bitgit.psa-software.com/Identite/nopass .customer.gitops-aws.git
    $ git checkout tags/v1.0.0 -b v1.0.0
      

    List of files in the repository:


  2. Copy the SSH key that you generated previously to the keys folder with the name aws_rsa.pub.
  3. Set environment variables for authentication in AWS. For more information about variables generating, see NoPass™ server environment variables. The access key and secret key should have been created earlier. Set the desired region. For example:
    $ export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
    $ export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    $ export AWS_DEFAULT_REGION=us-east-1
      
  4. Open the variables.tf file for more detailed settings or skip this step.
  5. Initialize the project.
    $ terraform init
      
  6. Run the infrastructure building simulation. Enter the following values:
    • AWS Certificate domain name.
    • Docker image path.
    • EC2 instanсe type. For the AWS EC2 type list, see Amazon EC2 Instance Types. We recommend using t3.small < 200 RPS.
    • EC2 memory limit. Specify the required memory limit for the container. For example, t3.small has 2GB memory, the limit on the container can be set up at 1536.
    • AWS region. For the AWS regions list, see What is Amazon EC2.
      $ terraform plan
        
      If you get a successful result, then you can run with the key apply:
      $ terraform apply
        
      Approximate setting time: 10 min

      The result is as follows:


      Please use these values for the following purposes:
    • alb_hostname: create a DNS CNAME record to this load balancer URL.
    • db_password: password to connect to the database.
    • db_password_arn: password storage path in the AWS secrets.
  7. To destroy the infrastructure, run the following command:
    $ terraform destroy –auto-approve
      

 

next topic: Overview: NoPass™ Employee SSO "SAML/OIDC"

Previous topic: Infrastructure scheme

 
Suggest edits