Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
setrofim committed Sep 17, 2024
1 parent f56c055 commit 4b60b3a
Show file tree
Hide file tree
Showing 8 changed files with 1,219 additions and 0 deletions.
52 changes: 52 additions & 0 deletions deployments/aws/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
DEPLOYMENT_NAME := setrofim-test
VPC_ID := vpc-0ca85d826ba2dc19f
SUBNET_ID := subnet-097626f1ba4f135ed
KEY_NAME := setrofim-test-kp
ADMIN_CIDR := 217.140.96.0/20
#INSTANCE_IMAGE := ami-0c38b837cd80f13bb
INSTANCE_IMAGE := ami-0a7055aa67ce4bf66
USER_TAG := $(shell whoami)

THIS_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
SCRIPT := $(THIS_DIR)/veraison
SCRIPT_ARGS := --deployment-name $(DEPLOYMENT_NAME)

# these parameters will work for bothe, the aws CLI cloudformation create-stack
# command, and the deployment script crate-stack command. For the latter, the
# parts before "=" can be omitted.
CREATE_STACK_PARAMS := ParameterKey=DeploymentName,ParameterValue=$(DEPLOYMENT_NAME)\
ParameterKey=KeyName,ParameterValue=$(KEY_NAME)\
ParameterKey=InstanceImage,ParameterValue=$(INSTANCE_IMAGE)\
ParameterKey=VpcId,ParameterValue=$(VPC_ID)\
ParameterKey=SubnetId,ParameterValue=$(SUBNET_ID)\
ParameterKey=AdminCidr,ParameterValue=$(ADMIN_CIDR)

.PHONY: create-stack
create-stack:
$(SCRIPT) $(SCRIPT_ARGS) create-stack \
--template-body file://$(THIS_DIR)/template.yaml \
--parameters $(CREATE_STACK_PARAMS)

.PHONY: delete-stack
delete-stack:
$(SCRIPT) $(SCRIPT_ARGS) delete-stack

.PHONY: update-address
update-address:
$(SCRIPT) $(SCRIPT_ARGS) update-address --tag $(USER_TAG)

.PHONY: bringup
bringup:
$(MAKE) -C $(THIS_DIR) create-stack
$(MAKE) -C $(THIS_DIR) update-address

.PHONY: teardown
teardown:
$(MAKE) -C $(THIS_DIR) delete-stack


# TODO: remove in final version
.PHONY: test
test:
$(SCRIPT) $(SCRIPT_ARGS) test
# end TODO
Loading

0 comments on commit 4b60b3a

Please sign in to comment.