Added redis.conf and Makefile commands to assist in machine setup

This commit is contained in:
mitchell 2019-06-01 19:42:46 -07:00
parent 383a3aa1cd
commit 3d3206ddfe
6 changed files with 1407 additions and 4 deletions

View file

@ -1,5 +1,8 @@
.PHONY: all build clean format test gen-certs-go
docker: install
docker-compose build
build: clean gen-certs-go format
go build -mod=vendor -o ./bin/server ./cmd/server
rm ./cmd/server/certs.go
@ -7,9 +10,6 @@ build: clean gen-certs-go format
clean:
rm -rf ./bin
docker: install
docker-compose build
local:
docker-compose up -d
@ -26,7 +26,7 @@ machine-create-google:
docker-machine create --driver google \
--google-address selfpass \
--google-project selfpass-241808 \
--google-machine-type f1-micro \
--google-machine-type g1-small \
--google-machine-image https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-9-stretch-v20190514 \
--google-username selfpass \
--google-zone us-west1-c \
@ -35,6 +35,26 @@ machine-create-google:
machine-rm:
docker-machine rm selfpass01
machine-ssh:
docker-machine ssh selfpass01
machine-put-redis.conf:
docker-machine scp ./redis.conf selfpass01:redis.conf
machine-put-data:
docker-machine scp -r ./data selfpass01:
machine-get-data:
docker-machine scp -r selfpass01:data ./
machine-add-grpc-server-tag:
gcloud compute instances add-tags selfpass01 \
--zone us-west1-c \
--tags grpc-server
machine-install-stackdriver-agent:
docker-machine ssh selfpass01 "curl -sSO https://dl.google.com/cloudagents/install-monitoring-agent.sh && sudo bash install-monitoring-agent.sh"
format:
gofmt -w -s -l .