-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/target group #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gkdg
wants to merge
16
commits into
master
Choose a base branch
from
feat/target-group
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
292df38
add aws command which register target
Farouklamri 9b2029d
add target group output
Farouklamri 0286be8
output target group info
Farouklamri 7aa8251
Update Makefile
Farouk-Lamri f9442ac
add dist config file with needed variable aws infos and import it in …
Farouklamri a738e10
delete rule with example.mvars
Farouklamri eb1d566
resolve conflict
Farouklamri 773438b
makefile env variables now importable
0e8273c
config.mvars.dist renamed to dev.mvars.dist
7777be0
update instance type
Farouklamri 9920e0e
formatting target-group command
Farouklamri 0d35e6a
Merge branch 'feat/target-group' of github.com:continuousphp/continuo…
Farouklamri f828fa4
update readme for target group
Farouklamri 61b3911
Update README.md
Farouk-Lamri e05fdd8
add successfullmessage to target group
Farouklamri d0a1f10
target-group does not print the commands and a small wording change o…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
.idea | ||
|
||
# Make | ||
!environments/example.mvars | ||
environments/*.mvars | ||
|
||
# SAM Specific files | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,16 @@ NC = \033[0m | |
|
||
default:help; | ||
|
||
appName=continuous-dev-environment | ||
env?=dev | ||
|
||
include environments/$(env).mvars | ||
|
||
region=us-east-1 | ||
stack_name=$(appName) | ||
profile=$(appName) | ||
baseDomain=example.com | ||
bucket=example-template-bucket | ||
role=arn:aws:iam::ACCOUNTID:role/cloudformation-role | ||
certificateArn=arn:aws:acm:us-east-1:ACCOUNTID:certificate/CERTIFICATEID | ||
[email protected] | ||
roleSSO=continuous-team-sso-Role-ABCDEFG | ||
appName=continuous-dev-environment | ||
stack_name?=$(appName) | ||
|
||
EC2InstanceId=$(shell aws ec2 describe-instances --profile $(profile) --region $(region) --filters "Name=instance-type,Values=m5.large" --query "Reservations[*].Instances[*].{Instance:InstanceId}" --output text) | ||
WebappTargetGroup=$(shell aws cloudformation describe-stacks --profile $(profile) --stack-name $(appName) --region $(region) --query "Stacks[0].Outputs[?OutputKey=='WebappTargetGroup'].OutputValue" --output text) | ||
ApiTargetGroup=$(shell aws cloudformation describe-stacks --profile $(profile) --stack-name $(appName) --region $(region) --query "Stacks[0].Outputs[?OutputKey=='ApiTargetGroup'].OutputValue" --output text) | ||
|
||
## Display this help dialog | ||
help: | ||
|
@@ -55,6 +53,7 @@ deploy: | |
--parameter-overrides BaseDomain=$(baseDomain) CertificateArn=$(certificateArn) \ | ||
User=$(user) RoleSSO=$(roleSSO) | ||
|
||
|
||
## Describe Cloud Formation stack outputs | ||
describe: | ||
@aws --profile $(profile) \ | ||
|
@@ -69,3 +68,15 @@ delete: | |
--region $(region) \ | ||
cloudformation delete-stack \ | ||
--stack-name $(stack_name) | ||
|
||
target-group: | ||
@aws elbv2 register-targets \ | ||
--target-group-arn $(WebappTargetGroup) \ | ||
--targets Id=$(EC2InstanceId) \ | ||
--region $(region) \ | ||
--profile $(profile) && echo "Instance is registered in webapp target group" | ||
@aws elbv2 register-targets \ | ||
--target-group-arn $(ApiTargetGroup) \ | ||
--targets Id=$(EC2InstanceId) \ | ||
--region $(region) \ | ||
--profile $(profile) && echo "Instance is registered in Api target group" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
bucket=example-template-bucket | ||
role=arn:aws:iam::ACCOUNTID:role/administrative-cloudformation-role | ||
certificateArn=arn:aws:acm:eu-west-1:ACCOUNTID:certificate/CERTIFICATEID | ||
baseDomain=example.com | ||
[email protected] | ||
roleSSO=continuous-team-sso-Role-ABCDEFG | ||
profile?=default | ||
region?=us-east-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.