Skip to content

Repository to contain all my installation and config scripts setup

License

Notifications You must be signed in to change notification settings

normanwongcl/dev-workflow-setup

Repository files navigation

A collection of installation scripts for me to reference when I need to reinstall something

Setup

  1. Execute the following on a new debian-based Linux OS
./first-time-setup/newMachine-setup.sh
  1. Then, execute the following to generate an ssh key
./first-time-setup/ssh-setup.sh

# Display public key in console, so you can copy and paste this to github
cat /home/$USER/.ssh/id_rsa.pub

# Adding an ssh key to github: https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account
  1. Then,execute the following to generate a gpg key
gpg2 --full-generate-key

# Back up the keypair and store it in a safe place.
gpg --export-secret-keys --armor <fingerprint> > privatekey.asc
gpg --export --armor <fingerprint> > pubkey.asc

# Full gpg setup guide avalaible: https://help.github.com/en/github/authenticating-to-github/generating-a-new-gpg-key

# Adding gpg key to github: https://help.github.com/en/github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account
  1. Once, you are done, set your env config, then run
# Create a new copy of the env file, and update the variables
cp .env.example .env

# Export env variables from env file
export $(xargs < .env)

# If you are also configuring AWS CLI,
# create a copy of .env.aws.example, delete all the comments
# and update the variables
cp .env.aws.example .env.aws

# Remove all comments and update env
export $(xargs < .env.aws)
  1. execute the following to setup your git configuration
./first-time-setup/git-setup.sh

# Test script by running
git config --global --list
  1. If you are using WSL and you want to use docker in your workflow, then execute
# Install docker community edition in ubuntu
./docker-setup/docker-setup.sh

# Copy and paste the contents from docker-setup/wsl.conf
sudo vi /etc/wsl.conf

# Test wsl.conf is working (restart required)
mount -l | grep drvfs

# Append the contents from docker-setup/.profile
cat docker-setup/.profile >> ~/.profile

# Follow the rest of the guide to setup docker in WSL
# <https://medium.com/faun/docker-running-seamlessly-in-windows-subsystem-linux-6ef8412377aa

# Continue starting from "Starting Docker’s Service with Windows 🚀"
  1. Setting up AWS CLI
# Run the following scripts
./.aws/credentials.sh
./.aws/config.sh
  1. Pushing a docker image to AWS ECR? Set up the authetication first.
# Download docker ecr credential helper binary
wget https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/0.4.0/linux-amd64/docker-credential-ecr-login

# Move binary to /usr/bin
sudo mv docker-credential-ecr-login  /usr/bin/

# Verify installation
docker-credential-ecr-login version

# Run this script to setup credential helper
./docker-setup/ecr-setup.sh

# Usage
docker pull <aws_account_id>.dkr.ecr.<aws_ecr_region>.amazonaws.com/ecr-repository-name:my-tag

docker push <aws_account_id>.dkr.ecr.<aws_ecr_region>.amazonaws.com/ecr-repository-name:my-tag

About

Repository to contain all my installation and config scripts setup

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages