@webnuts/catapult v0.7.7
catapult
A catapult is a ballistic device used to launch a projectile a great distance without the aid of explosive devices
Amazon AWS is awesome!
Catapult uses the following aAmazon AWS services:
Installation
npm install -g @webnuts/catapultRequirements
Your Catapult projects are required to contain the following files.
~/catapult-build.jsonThe file must contain the following key:
build(an array of strings representing commands to execute in the build phase)output(a string representing where the output files are located)Additionally, you may also specify keys for the phases:
install,pre_build, andpost_build. These work similarly tobuild.
Note: This file is required since it specifies the command which AWS CodeBuild will use to build the command, and which output it can expect from it.
Example
catapult-build.json{ "install": [ "npm install" ], "build": [ "ember build" ], "output": "dist" }Note: It is important that the
outputdirectory contains anindex.html-file if the project is a static website, since all trafic will be redirected to this.
Credentials
Since Catapult Amazon services, you need to register your credentials within the CLI so that we have access to make the necessary changes.
Amazon
To be implemented
Commands
You can call catapult <command> --help to find out more about a particular command.
TODO: Insert command list here
Initializing a Catapult project
catapult initialize <name>Initializes a brand new Catapult project. This will setup Amazon services.
Destroying a Catapult project
catapult destroy <name> [--confirm <confirm-string>]Destroys a Catapult project by deleting the corresponding Amazon services.
Add the
--confirmflag to comfirm the action. Theconfirm-stringneeds to be the name of the repository you are currently working in.
⚠️ This will delete every configuration associated with the Catapult project. This command is very destructive. Use with caution.
Deployments
catapult deployments [--limit=<limit>] [--offset=<offset>]Lists the latest deployments made to the branch you are currently working on unless another branch is specified using the
--branchflag. This information includes: Build number, status and durationUse the
--limitflag to specify how many builds you want to see.Use the
--offsetflag to specify where to list the builds from.catapult deployment [deployment-number | deployment-id | 'LATEST'] [--wait]Shows details about the latest deployment made to the branch you are currently working unless another branch is specified using the
--branchflag.You may specify a particular deployment-number (e.g.
14) or deployment-id (e.g.7f3feae8-a830-4f7b-8b1c-02f73452e328) to lookup a particular deployment (usecatapult deploymentsto find these).You may include a branch to lookup deployments on that branch.
Specify the
--waitflag to refresh the deployment information untill the build is no longerIN_PROGRESS.
Deploying
catapult deployRuns the deployment pipeline for the branch you are currently working on unless another branch is specified using the
--branchflag.
Undeploying
catapult undeployUndeploys the branch you are currently working on unless another branch is specified using the
--branchflag.
Rolling back to a previous deployment
catapult rollback [(--steps <steps> | --deployment <identifier>)]Rolls back the branch you are working on to the previous deployment unless another branch is specified using the
--branchflag.You may rollback a number of deployments by providing the
--steps <steps>flag, e.g.--steps 7You may rollback to a specific deployment by providing the
--deployment <identifier>flag, e.g.--deployment 7f3feae8-a830-4f7b-8b1c-02f73452e328or--deployment 7
💡 See a list of deployments using the catapult deployments command.
Hosts
catapult hostsLists the hosts (domain names) associated with the Catapult project.
Adding Hosts
catapult hosts:add <host> [--confirm]Adds a host to the Catapult project, e.g.
example.comordevelopment.example.comfor the branch you are currently working on unless another is specified using the--branchflag.Use the
--confirmflag to confirm the action.
Removing Hosts
catapult hosts:remove <host> [--confirm]Removes a hosts to the catapult project.
Add the
--confirmflag to comfirm the action. Theconfirm-stringneeds to be the name of the repository you are currently working in.
Limiting Requests
catapult limitsLists limits for the Catapult project.
Configuring limits
catapult limits:configureConfigures the limits for the Catapult project.
Here you will be able to configure:
- Caching policies (TTL) for CloudFront distributions
- ... (rest is not documented yet)
Credentials
⚠️ You should treat these credentials like your password. Do not version control them.
catapult credentials [--unhide | --clear]Will output a list of the registered credentials you have registered within the CLI.
Access tokens can be fully displayed by using the
--unhideflag.When in a hurry, all access tokens can be removed using the
--clearflag.
Configuring credentials
catapult credentials:configure [amazon]Prompts you for the required credentials required to manage Catapult projects.
💡 To generate these access tokens, please refer to the credentials section.
Catapult Management Commands
The following commands are used to maintain and develop on Catapult. Use with caution.
Generating a buildspec.yml file for a Catapult project
catapult build [phase]Will build the projects according to the specifications found in
~/catapult-build.json.Specify a
phaseto only execute commands in that phase. Valid values areinstall,pre_build,build, and,post_build.
Note: Running this command will have zero influence on AWS.
Updating Catapult projects
catapult update [--all, --lambda]Will re-initialize AWS services such that they get the latest code.
You may specify the
--allflag to update all Catapult project.Specify the
-lambdaflag to update only the Lambda functions.
Managing CloudFront distributions
catapult distributionsWill list information about all CloudFront distributions, e.g. their status, url, etc.
catapult distributions:syncWill syncronize CloudFront distributions for the branch you are currently working on. Will also remove any unused/old distributions for the repository.
Managing Route53 records
catapult recordsWill list information about all Route53 records
catapult records:syncWill syncronize Route53 records for the branch you are currently working on. Will also remove any unused/old records for the repository.
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago