https://github.com/leapfrogtechnology/shift
Tool for Automated Infrastructure Creation and Deployment
https://github.com/leapfrogtechnology/shift
Last synced: 11 months ago
JSON representation
Tool for Automated Infrastructure Creation and Deployment
- Host: GitHub
- URL: https://github.com/leapfrogtechnology/shift
- Owner: leapfrogtechnology
- Created: 2019-08-26T08:24:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-24T22:57:11.000Z (almost 3 years ago)
- Last Synced: 2025-01-08T20:24:59.956Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 11.3 MB
- Stars: 2
- Watchers: 10
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shift



Automated infrastructure creation and deployment tool.
## About
Shift focuses on creating your infrastructure with ease and automating your deployments.
## Usage
### 1. Install Shift:
```
$ curl -sf https://raw.githubusercontent.com/leapfrogtechnology/shift/master/install.sh | sudo sh
```
### 2. Verify Installation:
```
$ shift-cli
```
### 3. AWS Credentials
Before using shift, you have to provide your AWS credentials. Also, make sure you have the correct access for your credentials.
Simply create `~/.aws/credentials` file for storing AWS credentials.
Example:
```
[example-profile]
aws_access_key_id = xxxxxx
aws_secret_access_key = xxxxxx
```
To know more about AWS configurations, view [Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
### 4. Setup
Go to your project directory and run `setup` command to initiate the setup process.
```
$ shift-cli setup
```
- Enter the name of your project
- Choose the platform
- Choose your AWS profile that was setup earlier.
- Choose the AWS Region where you want your infrastructure to be created.
- Choose the type of deployment you want.
- Name your environment.
- If Backend:
- Enter your application port
- Enter healthcheck path
- Enter dockerfile path
- Enter Slack webhook URL
-
```
Example:
Project Name: shiftbeta
Choose Cloud Provider: AWS
Choose AWS profile: default
Region: US East (North Virginia)
Choose Deployment Type: Backend
Environment Name: dev
Application port: 8080
Heathcheck Path: /api
Dockerfile Path: ./
Slack Webhook URL: https://webhook.slack.com
```
`shift.json` file will be created in your project directory like below.
```json
{
"name": "shiftbeta",
"platform": "AWS",
"profile": "default",
"region": "us-east-1",
"type": "Backend",
"port": "80",
"dockerFilePath": "./",
"healthCheckPath": "/",
"env": {
"dev": {
"cluster": "shiftbeta-dev",
"service": "shiftbeta-dev",
"image": "009409476372.dkr.ecr.us-east-1.amazonaws.com/shiftbeta/dev-backend",
"taskDefinition": "shiftbeta-dev"
}
}
}
```
**If you do not want a project-specific config file, you can skip the above step.**
### 5. Deploy
```
$ shift-cli deploy [env]
$ shift-cli deploy dev
```
Here `dev` is the environment you specified in `shif.json`.
### 6. Destroy
```
$ shift-cli destroy [env]
```
Destroy infrastracture.
### 7. Usage with CI/CD:
Instead of setting up a `~/.aws/credentials` file. You can also use the following environment variables to set up your AWS credentials.
| Variable | Description |
| --------------------- | -------------------------------------- |
| AWS_ACCESS_KEY_ID | Your AWS access key |
| AWS_SECRET_ACCESS_KEY | Your AWS secret key |
| AWS_REGION | AWS region where you added your secret |