Skip to content

deployment automation tool which consists of generating dockerfile, sonarcloud github action file, Sentry github action files and Cloud Run github action file (development, staging, production) etc...

Notifications You must be signed in to change notification settings

thcollective/thc-deployment-tool

Repository files navigation

thc_logo

THC deployment automation tool

Maintained by: ass77

What is it about?

This deployment automation tool helps users to generate basic files that are required to deploy their app on cloud run, scan their code to check for bugs before deployment and tracing any error on the app in dev mode or prod mode. The script will generate files as follows:

  • Dockerfile for frontend (vue, nuxt) and backend(expressJS, gofiber)
  • Sonarcloud github actions and properties file (need to seek from Admin for keys)
  • Deploying to Cloud Run github actions
  • Pub/Sub to Redpanda Kafka

Download and Run

  1. Download the binary package based on your OS and set to local path.

Darwin

curl -vLJO https://github.com/thcollective/thc-deployment-tool/releases/download/v0.4.0/thc-deployment-tool_0.4.0_darwin_amd64.tar.gz
tar -xzvf thc-deployment-tool_0.4.0_darwin_amd64.tar.gz
chmod +x ./thc-cli-tool
mv ./thc-cli-tool /usr/local/bin
curl -vLJO https://github.com/thcollective/thc-deployment-tool/releases/download/v0.4.0/thc-deployment-tool_0.4.0_darwin_arm64.tar.gz
tar -xzvf thc-deployment-tool_0.4.0_darwin_arm64.tar.gz 
chmod +x ./thc-cli-tool
mv ./thc-cli-tool /usr/local/bin

Linux

curl -vLJO https://github.com/thcollective/thc-deployment-tool/releases/download/v0.4.0/thc-deployment-tool_0.4.0_linux_amd64.tar.gz
tar -xzvf thc-deployment-tool_0.4.0_linux_amd64.tar.gz 
chmod +x ./thc-cli-tool
mv ./thc-cli-tool /usr/local/bin
curl -vLJO https://github.com/thcollective/thc-deployment-tool/releases/download/v0.4.0/thc-deployment-tool_0.4.0_linux_arm64.tar.gz
tar -xzvf thc-deployment-tool_0.4.0_linux_arm64.tar.gz 
chmod +x ./thc-cli-tool
mv ./thc-cli-tool /usr/local/bin

Windows

  • Tap here to download for amd64
  • Tap here to download for arm64
  • Right click the file and extract preferably using 7zip.
  • Add thc-cli-tool.exe to system properties Environment Variables...
  1. For Darwin/Linux users, run thc-cli-tool using the terminal on root directory of your project, then start answering the prompt.

  2. For windows user, run ./thc-cli-tool.exe on your working project root directory, preferably run it on your terminal, then start answering the prompt.

  3. The live url will be display on github actions tab located under deploy job.

  4. Hit ctrl+c or ctrl+d to if you want to abort the process.

THC Redpanda Streaming Platform

  1. For redpanda users, note that appName is a global name and developers need to keep it consistent followed by application that they using to pub/sub a message/event

payload:

{
	"clientId": "appName",
	"topic": "topicName",
	"numPartitions": 3
}

payload:

{
	"clientId": "appName",
	"topic": "topicName"
}
  • Continue with thc-cli-tool prompt

  • Install dependencies @ npm i kafkajs uuid dotenv @kafkajs/confluent-schema-registry

  • Get Redpanda Kafka Broker IP addresses and Redpanda Schema Registry Host URL from Adri or Ming

NOTE (for maintainers): The procedure and deployment notes are here

How To Run (in development mode)

  1. Install dependencies
go mod tidy
  1. Run main file
go run cmd/thc-cli-tool/main.go
  1. Build main file
go build cmd/thc-cli-tool/main.go

(back to top)

About

deployment automation tool which consists of generating dockerfile, sonarcloud github action file, Sentry github action files and Cloud Run github action file (development, staging, production) etc...

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published