1.1.14 • Published 5 years ago

@ef-class/infra-cli v1.1.14

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

infra-cli

npm install -g @ef-class/infra-cli

infrastructure teardown

  • infra-cli teardown --app {{app}} --branch {{branch}}
    • delete the CloudFront CDNs for the apps
    • delete the domains for the apps

infrastructure create

  • infra-cli create --acc {{account}} --app {{app}} --branch {{branch}}
    • create the CloudFront CDNs for the apps
    • create the domains for the apps

infrasturcture check

  • infra-cli check --acc {{account}} --app {{app}} --branch {{branch}}
    • checks the Terrafrom script is correct

--app Can be have a vlaue of '*' which equates to all the apps in the config or it can be a listy 'a,b,c' or it can be a single app 'a'

Config file

You will need to create this config file and add it to the root of the project.

infra.config.json

{
    "devel": { 
        "account": "devel",
        "apps": ["accounts", "student", "teacher", "static", "lesson-item-renderer", "design-system"],
        "state": {
            "bucket": "ctx-terraform-state-devel",
            "dir": "devel/fe_features",
            "region": "eu-west-1"
        },
        "aws": {
            "secret": "{{aws secrect}}",
            "key": "{{aws key}}",
            "region": "eu-west-1"
        },
        "terraform": { 
            "delimiter": "o",
            "domain": "ctx.ef.com",
            "s3": {
                "bucket": "ef-class-web-devel",
                "loggingPrefix": "logs/cloudfront/",
                "originAccessIdentity": "origin-access-identity/cloudfront/E3N3GP1T23HRMI" 
            },
            "r53": { 
                "zoneId": "ZVRF914X2I9LY"                
            },
            "cf": { 
                "amcCert": "arn:aws:acm:us-east-1:817216657652:certificate/c6c4616d-0f8d-492e-bf1e-9d66c17e3730"
            }
        }
    }
}

Usage

cd ef-class/ef-class-web

infra-cli --help

infra-cli teardown --help infra-cli create --help infra-cli check --help

Development

npm run test to run the tests. This command first builds then runs the tests.

npm run refresh to install the cli locally for manual testing. You can run this command after a code update and it'll build and reinstall the npm package for the cli locally.

npm run build transpiles the ts to js.

1.1.14

5 years ago

1.1.13

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago