The Jake and Troy devopsy utility.
The versions listed for these prerequisites are current at the time of writing. More recent versions will likely work but "your mileage may vary".
- A current laptop or desktop running the latest version of Windows 10 Pro with WSL2 and Ubuntu 20.04, or MacOS.
- A good code editor. While we recommend Microsoft VSCode 1.57.1 and reference it in some examples any contemporary editor will work.
- Docker v20.10.9
- Docker Compose v1.29.2
- Git 2.31.1
- jq v1.6: A shell tool for parsing JSON.
- Node.js v16.3.0 with NPM 7.15.1
- Bash Debug v0.3.9: Required if you are developing and debugging with VSCode.
-
Clone the project
-
Install dependencies
npm install
Note that the install process will also symlink the scripts in the src folder to your path making the CLI available from any project directory.
-
Optionally build any of the Dockerised CLI images that will be used.
- GitHub: Build src/docker/gh.dockerfile as gh:latest to make the GitHub CLI available at
joy gh
. Note that the GitHub CLI is required if you wish to usejoy git ticket
with a GitHub repository. - Azure DevOps: Build src/docker/az.dockerfile as az:latest to make the Azure DevOps CLI available at
joy az
. Note that the Azure DevOps CLI is required if you wish to usejoy git ticket
with an Azure DevOps hosted Git repository.
- GitHub: Build src/docker/gh.dockerfile as gh:latest to make the GitHub CLI available at
Joy can be thought of as a bash task runner that can launch scripts that are grouped together in families.
Starting with this release the Joy project will be switching to Github Flow for managing changes. Github Flow differs from some traditional Git flows in that it does not use a long running develop branch. Instead, every merge to main is considered deployable and should be deployed.
- Create a feature branch from main. To ensure consistency in naming convention use
git joy ticket {ticket-number}
. - Push the feature branch upstream to origin
- Make code changes to the local feature branch, commit often and update the upstream branch often.
- When ready, create a Pull Request and request a review.
- Act on the Pull Request feedback, committing often.
- When the Pull request has been approved, deploy to production.
- If there is a failure, redeploy the current tip of the main branch to production and revisit the code in your local branch, restarting the process.
- Otherwise, complete the Pull Request to merge the code back to main, thus updating the tip of main.
opinionated view on environment settings per project, get read from *.env, the passed to scripts.
Most commands are invoked directly from joy and a subcommand family. Some commands are available directly from Joy and in one command, cw
, is available outside of Joy.
Prefix | Family | Command | description |
---|---|---|---|
joy | aws | certificate-manager-new-cert | Provision new ACM certificates |
joy | aws | cloudfront-new-distribution | Create a new CloudFront distribution |
joy | aws | dynamodb-new-table | Create a new DynamoDB table |
joy | aws | route53-cloudfront-alias | Alias a CloudFront distribution to a Route53 CNAME |
joy | aws | route53-new-zone | Create a new Route53 hosted zone |
joy | aws | s3-new-web | Create a new S3 bucket configured for static web hosting |
joy | git | git-ticket | Create a new branch based on the provided ticket number |
joy | wp | deploy | Deploy a WebProducer application to S3 |
joy | wp | wp-install | Create a new empty WebProducer instance |
joy | wpe | build-stack | |
joy | wpe | exportEnv | |
joy | wpe | setHomeSiteUrl | |
joy | wpe | sart-stack | |
joy | wpe | syncCodeToStage | |
joy | wpe | syncDataAndPluginsFromProdToDev | |
joy | create-certs | Create a new self-signed certificate | |
joy | cw | Manage working directory bookmarks | |
joy | help | Get help for the Joy CLI | |
joy | info | Get information about the current directroy | |
cw | Change the current working directory to one previously bookmarked |
Since the AWS CLI is now invoked from joy aws
all the custom AWS scripts are blocked as their commands get passed the CLI and are invalid. This will be addressed in an upcoming release.
See CHANGELOG.md