diff --git a/README.md b/README.md index 9e732fa..58aa4f0 100644 --- a/README.md +++ b/README.md @@ -119,5 +119,3 @@ Tearing down Rabbitory involves selecting the global region and AWS region code --- 🤝 Developed By: Jacqueline Amherst | Zijin Gong | Laren Cozart | Mason Abruzzesse - --->create links for our names to our github overview pages diff --git a/assets/deploy-success.png b/assets/deploy-success.png new file mode 100644 index 0000000..a03613e Binary files /dev/null and b/assets/deploy-success.png differ diff --git a/assets/destroy-success.png b/assets/destroy-success.png new file mode 100644 index 0000000..edc924f Binary files /dev/null and b/assets/destroy-success.png differ diff --git a/assets/provide-custom-domain.png b/assets/provide-custom-domain.png new file mode 100644 index 0000000..38cf4d5 Binary files /dev/null and b/assets/provide-custom-domain.png differ diff --git a/assets/rabbitory-deploy-success.png b/assets/rabbitory-deploy-success.png deleted file mode 100644 index 6ef9ad0..0000000 Binary files a/assets/rabbitory-deploy-success.png and /dev/null differ diff --git a/assets/rabbitory-destroy-success.png b/assets/rabbitory-destroy-success.png deleted file mode 100644 index b2b55b6..0000000 Binary files a/assets/rabbitory-destroy-success.png and /dev/null differ diff --git a/assets/select-aws-region-ex.png b/assets/select-aws-region-ex.png deleted file mode 100644 index 38300d7..0000000 Binary files a/assets/select-aws-region-ex.png and /dev/null differ diff --git a/assets/select-global-region-ex.png b/assets/select-global-region-ex.png deleted file mode 100644 index bb7ca9b..0000000 Binary files a/assets/select-global-region-ex.png and /dev/null differ diff --git a/assets/select-global-region.png b/assets/select-global-region.png new file mode 100644 index 0000000..b70d80f Binary files /dev/null and b/assets/select-global-region.png differ diff --git a/assets/select-http-or-https.png b/assets/select-http-or-https.png new file mode 100644 index 0000000..5d49d46 Binary files /dev/null and b/assets/select-http-or-https.png differ diff --git a/assets/select-region-code.png b/assets/select-region-code.png new file mode 100644 index 0000000..b8f027d Binary files /dev/null and b/assets/select-region-code.png differ diff --git a/cli/commands/deploy.ts b/cli/commands/deploy.ts index 0aff6ad..4a4af77 100644 --- a/cli/commands/deploy.ts +++ b/cli/commands/deploy.ts @@ -21,7 +21,9 @@ import { getRegion } from "../utils/region"; const TERMINAL_WIDTH = stdout.columns || 80; const START_MSG = "\nPreparing to setup the Rabbitory Infrastructure...\n"; -const URL_WAIT_MSG = "\nWaiting for Rabbitory Control Panel to be ready..."; +const RESOURCE_PROVISIONING_MSG = "\nProvisioning AWS Resources for Rabbitory...\n(This usually takes about 2-3 minutes to complete)\n"; +const DNS_RECORDS_MSG = "\nCreating DNS Records...\n(This can take between 5 and 30 minutes to complete dependent on DNS record propagation)\n"; +const URL_WAIT_MSG = "\nWaiting for Rabbitory Control Panel to be ready...\n(This usually takes about 3-5 minutes to complete)\n"; export const deploy = async () => { try { @@ -33,6 +35,8 @@ export const deploy = async () => { const userResponse = await promptUserForCustomDomain(); + console.log(RESOURCE_PROVISIONING_MSG); + await runWithSpinner( "Setting up Rabbitory Contol Panel IAM...", () => createRabbitoryIAM(), @@ -72,13 +76,17 @@ export const deploy = async () => { throw new Error("Rabbitory instance does not have a public IP yet."); } const zoneResult = await handleHostedZoneSetup(domainName, region); + + console.log(DNS_RECORDS_MSG); + await runWithSpinner( - "Creating A record for apex domain...", + "Creating an A-record for apex domain...", () => createRecord(zoneResult.hostedZoneId, domainName, ip, region), - "A record for apex domain created" + "Created A-record for apex domain" ); + await runWithSpinner( - "Creating A record for www subdomain...", + "Creating an A-record for www subdomain...", () => createRecord( zoneResult.hostedZoneId, @@ -86,8 +94,9 @@ export const deploy = async () => { ip, region ), - "A record for www subdomain created" + "Created A-record for www subdomain" ); + await runWithSpinner( "Waiting for DNS propagation...", () => waitForHTTPPropagation(domainName), @@ -101,6 +110,7 @@ export const deploy = async () => { } console.log(URL_WAIT_MSG); + const rabbitoryUrl = await getReadyRabbitoryUrl( instanceId, userResponse && `https://${userResponse.domainName}` @@ -108,11 +118,12 @@ export const deploy = async () => { console.log( chalk.white( - `\nThe Rabbitory Control Panel is available at: ${chalk.cyan( + `\nThe Rabbitory Control Panel is now available at: ${chalk.cyan( rabbitoryUrl )}\n` ) ); + console.log(formatLogo(TERMINAL_WIDTH)); } catch (error) { console.error( @@ -120,6 +131,7 @@ export const deploy = async () => { error, "\n" ); + console.log("Rolling back your deployment..."); await destroy(); console.log("\nDeployment successfully rolled back."); diff --git a/cli/commands/destroy.ts b/cli/commands/destroy.ts index 85b2b07..2412d09 100644 --- a/cli/commands/destroy.ts +++ b/cli/commands/destroy.ts @@ -10,6 +10,7 @@ import { promptUserForRegionCode } from "../utils/promptUserForAWSRegion"; import chalk from "chalk"; const START_MSG = '\nPreparing to teardown the Rabbitory Infrastructure...\n'; +const TEAR_DOWN_MSG = "\nDestroying AWS Resources for Rabbitory...\n(This usually takes about 3-5 minutes to complete)\n" const COMPLETE_MSG = `\nRabbitory infrastructure teardown complete.\nAll Rabbitory AWS services and resources have been removed.\n` export const destroy = async () => { @@ -18,6 +19,8 @@ export const destroy = async () => { await promptUserForRegionCode(); + console.log(TEAR_DOWN_MSG); + await runWithSpinner("Deleting DynamoDB Table...", () => deleteTable(), "Deleted DynamoDB Table"); await runWithSpinner("Terminating Control Panel EC2 instance...", () => deleteControlPanel(), "Terminated EC2 instance"); await runWithSpinner("Deleting RabbitMQ Broker Instances...", () => deleteAllBrokerInstances(), "Deleted RabbitMQ Broker Instances"); diff --git a/cli/utils/promptUserForDomain.ts b/cli/utils/promptUserForDomain.ts index 7d8947b..4f90e2a 100644 --- a/cli/utils/promptUserForDomain.ts +++ b/cli/utils/promptUserForDomain.ts @@ -27,7 +27,7 @@ export const promptUserForCustomDomain = ]); if (useResponse.deploymentMethod === defaultPublicIP) { - console.log("\nProceeding with default public IP setup...\n"); + console.log("\nProceeding with default public IP setup..."); return null; }