Skip to content

How to build a new environment for GSS

We need the following steps to build a new environment for GSS:

  1. create a S3 bucket for "CloudFront Origins"
  2. create a CloudFront distribution
  3. create a route53 record for routing traffic to the CloudFront distribution
  4. create an AWS CodeBuild project
  5. create an AWS CodePipeline project
  6. create Jenkins new job for GSS new environment
  7. modify Jenkins file to trigger the build of the new environment

GSS new environment: https://new.globalservicestatus.com

AWS S3 bucket

new_env_1.png

We need to create two S3 buckets with reference to "status.webex.com.s3b" and "log-prod-status.webex.com"

Notes:

  1. need to edit "Properties → Edit static website hosting", save the below information and copy the "Bucket website endpoint" to the origins of CloudFront distribution
    1 2
  2. need to add the permission in "Permissions → Bucket policy"
    new_env_2.png

AWS Route53

We need to create a record for routing traffic to the CloudFront distribution.

new_env_3.png

AWS CloudFront

We need to create a CloudFront distribution with the origins: beta-status.webex.com.s3b

new_env_4.png

Notes:

  1. the "Origin domain" need to paste the "Bucket website endpoint" from 'AWS S3 bucket-Notes1'
    new_env_5.png
  2. need to create a certificate for the new domain name
    new_env_6.png
  3. create custom error response in "Error pages"
    new_env_7.png
  4. test if it's normal by creating an invalidation:
    new_env_8.png

AWS CodeBuild

We need to create an AWS CodeBuild project.

Notes:

  1. need to ensure that the Permissions policies of the service role of the newly created CodeBuild project and the service role of the production CodeBuild project are consistent(mainly: pipelinePolicy and InvalidateCloudFront)
    new_env_9.png new_env_10.png
  2. add "Buildspec"

new_env_11.png

AWS CodePipeline

We need to create an AWS CodePipeline project.

new_env_12.png

new_env_13.png

Notes:

  1. In the first step "FetchDistribution", when creating new folder in S3 key(gss-cisco-dist-bucket/web-client), need to use the AWS KMS key if no permission
    new_env_14.png new_env_15.png
  2. In the third step "NotifySparkRoom", the param: {{gss-web-beta.DistributionUrl}}: 1. need to create a stack in CloudFormation with template 2. add beta environment in "AllowedValues" in esp_pipeline.yaml of S3
    new_env_16.png new_env_17.png new_env_18.png

Jenkins Job

  1. We need to create new branches: master-new and staging-new in github repo: https://sqbu-github.cisco.com/SAP/global-service-status-webui-vuejs, and then the two new branches will show at Jenkins job: https://engci-private-sjc.cisco.com/jenkins/pda/view/Portal/job/GSS%20Pipeline2/job/global-service-status-webui-vuejs
    new_env_19.png
  2. Modify Jenkins file to trigger the build of the new environment:
    new_env_20.png new_env_21.png new_env_22.png

Permission Issue

  1. Add cors value in "AWS Parameter Store", so that the new front-end page can access the back-end dns of the production
    Notes: remember to refresh backend service in Elastic BeanStalk to make it take effect!
    1
  2. To access admin page: https://new.globalservicestatus.com/admin, need to add the permissions:
    1. Go to https://wampmtui.cloudapps.cisco.com/loggedIn#/edit-oauth/366 to add cisco sso permission for new oauthRedirectUrl: https://new.globalservicestatus.com/oauth
      new_env_23.png
    2. Need to add permissions for S3 bucket: refrence to 'AWS S3 bucket|Notes'