- Notifications
You must be signed in to change notification settings - Fork14
DevopsArtFactory/goployer
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
goployer is an application you can use for EC2 deployment. You can deploy in a blue/green mode. goployer onlychanges the autoscaling group so that you don't need to create another load balancer or manually attach autoscaling group to target group.
- You have to create a load balancer and target groups of it which goployer attach a new autoscaling group to.
- If you want to setup loadbalancer and target group with terraform, then please check thisdevopsart workshop.
- Please understand how goployer really deploys application before applying to the real environment.
- Here's the steps that goployer executes for deployment
- Generate new version for current deployment.
If other autoscaling groups of sample application already existed, for examplehello-v001, then next version will behello-v002 - Create a new launch template.
- Create autoscaling group with launch template from the previous step. A newly created autoscaling group will be automatically attached to the target groups you specified in manifest.
- Check all instances of all stacks are healty. Until all of them pass healthchecking, it won't go to the next step.
- (optional) If you add
autoscalingin manifest, goployer creates autoscaling policies and put these to the autoscaling group. If you usealarmswith autoscaling, then goployer should also create a cloudwatch alarm for autoscaling policy. - After all stacks are deployed, then goployer tries to delete previous versions of the same application.Launch templates of previous autoscaling groups are also going to be deleted.
- You can use
spot instanceoption with goployer. - There are two possible ways to use
spot instance.
instance_market_options : You can set spot instance options and with this, you will only use spot instances.
instance_market_options:market_type:spotspot_options:block_duration_minutes:180instance_interruption_behavior:terminate# terminate / stop / hibernatemax_price:0.2spot_instance_type:one-time# one-time or persistent
mixed_instances_policy : You can mixon-demand andspot together with this setting.
mixed_instances_policy:enabled:trueoverride_instance_types: -c5.large -c5.xlargeon_demand_percentage:20spot_allocation_strategy:lowest-pricespot_instance_pools:3spot_max_price:0.3
You should see the detailed information inmanifest format page.
Goployer supports advanced EBS volume management with the following features. You can find a complete example inapi-test-example.yaml.
block_devices: -device_name:/dev/xvdavolume_size:30volume_type:gp3
Control whether EBS volumes should be deleted when the instance terminates:
block_devices: -device_name:/dev/xvdavolume_size:30volume_type:gp3delete_on_termination:false# optional, defaults to false
Create volumes from existing snapshots:
block_devices: -device_name:/dev/sdfsnapshot_id:snap-1234567890abcdef0# optional, for volume creation from snapshotvolume_size:100volume_type:gp3delete_on_termination:true
Create encrypted volumes with KMS:
block_devices: -device_name:/dev/sdgvolume_size:50volume_type:gp3encrypted:truekms_alias:alias/my-kms-keydelete_on_termination:false
device_name: The device name to expose to the instancevolume_size: Size of the volume in GiBvolume_type: Type of EBS volume (gp2, gp3, io1, io2, st1, sc1)delete_on_termination: Whether to delete the volume on instance termination (default: false)snapshot_id: ID of the snapshot to create the volume from (optional)encrypted: Whether to encrypt the volume (default: false)kms_alias: KMS key alias for encryption (required if encrypted is true)
For a complete example showing how to use these features together, seeapi-test-example.yaml.
- You can configure multiple network interfaces (ENIs) for your instances.
- Both primary and secondary ENIs are optional configurations.
- If not specified, default network interface settings will be used.
Security groups can be configured in three ways:
- Using Launch Template Security Groups (Default):
security_groups: -sg-12345678
- Using Primary ENI Security Groups (Optional):
primary_eni:device_index:0subnet_id:subnet-12345678security_groups: -sg-12345678
- Using Multiple ENIs with Security Groups (Optional):
primary_eni:device_index:0subnet_id:subnet-12345678security_groups: -sg-12345678secondary_enis: -device_index:1subnet_id:subnet-87654321security_groups: -sg-87654321private_ip_address:10.0.1.100 -device_index:2subnet_id:subnet-87654321security_groups: -sg-87654321private_ip_address:10.0.1.101
Note:
- You cannot use both ENI security groups and launch template security groups at the same time. You must choose either:
- Using launch template security groups (without ENI)
- Using ENI security groups (with ENI)
- Security group IDs must start with 'sg-' prefix
- ENI configuration is optional and should be used only when you need specific network interface configurations
- Each ENI (primary and secondary) must have at least one security group specified
device_index: The index of the network interface (0 for primary, 1+ for secondary)subnet_id: The ID of the subnet to attach the ENI tosecurity_groups: List of security group IDs to associate with the ENIprivate_ip_address: (Optional) Specific private IP address to assign to the ENIdelete_on_termination:- If
true: The ENI will be automatically deleted when the instance is terminated - If
false: The ENI will be preserved when the instance is terminated, allowing you to reuse it with another instance - Primary ENI typically uses
trueto clean up resources - Secondary ENIs often use
falseto preserve network configurations and IP addresses
- If
- You can find few examples of manifest file so that you can test it with this.
cd examples/manifestsAbout
AWS Deployer with Go
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors8
Uh oh!
There was an error while loading.Please reload this page.
