bitovi/Deploy Pixel Tracker to AWS EC2

Deploy a simple pixel tracker to an AWS Virtual Machine (EC2)

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stalelast commit Feb 15, 2024
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: bitovi/github-actions-deploy-pixel-tracker@55aefc2084a9ffa3062292b529c9fe89bc0e8e40 # v0.1.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
checkoutSpecifies if this action should checkout the codenotrue
aws_access_key_idAWS access key IDyes
aws_secret_access_keyAWS secret access keyyes
aws_session_tokenAWS session token, if you're using temporary credentialsno
aws_default_regionAWS default regionyesus-east-1
aws_resource_identifierAuto-generated by default so it's unique for org/repo/branch. Set to override with custom naming the unique AWS resource identifier for the deployment. Defaults to `${org}-${repo}-${branch}`.
aws_extra_tagsA list of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`no{}
aws_ec2_instance_typeThe AWS EC2 instance typenot3.medium
aws_ec2_instance_profileThe AWS IAM instance profile to use for the EC2 instance. Use if you want to pass an AWS role with specific permissions granted to the instanceno
aws_ec2_create_keypair_smCreates a Secret in AWS secret manager to store a kypairnofalse
aws_ec2_instance_vol_sizeRoot disk size for the EC2 instanceno10
aws_ec2_additional_tagsA JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`no
aws_ec2_ami_filterAMI filter to use when searching for an AMI to use for the EC2 instance. Defaults to `ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*`noubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*
env_ghsSet to true to include a Github Secrets (.env formatted) in the environment variablesno""
grafana_datasource_dirPath to the grafana datasource directorynoobservability/grafana/datasources
prometheus_configPath to the prometheus config filenoobservability/prometheus/prometheus.yml
grafana_scrape_intervalHow frequently to scrape targets by default in the Prometheus data-source.no
prometheus_scrape_intervalHow frequently to scrape targets by defaultno15s
prometheus_retention_periodWhen to remove old data. Defaults to 15d.no15d
cadvisor_enableEnable cadvisor container in docker-composeno
cadvisor_extra_targetsAdd cadvisor targetno
node_exporter_enableEnable node-exporter container in docker-composeno
node_exporter_extra_targetsAdd node-exporter targetno
print_yaml_filesno
tf_stack_destroySet to "true" to Destroy the created AWS infrastructure for this instancefalse
tf_state_file_nameChange this to be anything you want to. Carefull to be consistent here. A missing file could trigger recreation, or stepping over destruction of non-defined objects.no
tf_state_file_name_appendAppend a string to the tf-state-file. Setting this to `unique` will generate `tf-state-aws-unique`. Can co-exist with the tf_state_file_name variable. no
tf_state_bucketAWS S3 bucket to use for Terraform state. Defaults to `${org}-${repo}-{branch}-tf-state-aws`no
tf_state_bucket_destroyForce purge and deletion of S3 tf_state_bucket defined. Any file contained there will be destroyed. `tf_stack_destroy` must also be `true`no
aws_domain_nameDefine the root domain name for the application. e.g. bitovi.com. If empty, ELB URL will be provided.no
aws_sub_domainDefine the sub-domain part of the URL. Defaults to `${org}-${repo}-{branch}`
aws_root_domainDeploy application to root domain. Will create root and www DNS records. Domain must exist in Route53.no
aws_cert_arnExisting certificate ARN to be used in the ELB. Use if you manage a certificate outside of this action. See https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-list.html for how to find the certificate ARN.no
aws_create_root_certGenerates and manage the root certificate for the application to be used in the ELB.no
aws_create_sub_certGenerates and manage the sub-domain certificate for the application to be used in the ELB.no
aws_no_certSet this to true if you want not to use a certificate in the ELB.nofalse
aws_vpc_createDefine if a VPC should be createdno
aws_vpc_nameSet a specific name for the VPCno
aws_vpc_cidr_blockDefine Base CIDR block which is divided into subnet CIDR blocks. Defaults to 10.0.0.0/16.no
aws_vpc_public_subnetsComma separated list of public subnets. Defaults to 10.10.110.0/24no
aws_vpc_private_subnetsComma separated list of private subnets. If none, none will be created.no
aws_vpc_availability_zonesComma separated list of availability zones. Defaults to `aws_default_region.no
aws_vpc_idAWS VPC ID. Accepts `vpc-###` values.no
aws_vpc_subnet_idSpecify a Subnet to be used with the instance. If none provided, will pick one.no
aws_vpc_enable_nat_gatewayEnables NAT gatewayno
aws_vpc_single_nat_gatewayCreates only one NAT gatewayno
aws_vpc_external_nat_ip_idsComma separated list of IP IDS to reuse in the NAT gatewaysno
aws_vpc_additional_tagsA JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}`no
docker_cloudwatch_enableToggle cloudwatch creation for Docker containers.notrue
docker_cloudwatch_skip_destroyToggle deletion or not when destroying the stack.nofalse
aws_ec2_instance_public_ipAdd a public IP to the instance or not. (Not an Elastic IP)notrue
aws_ec2_port_listList of ports to be enabled as an ingress rule in the EC2 SG, in a [xx,yy] format - Not the ELBno
aws_elb_app_portPort to expose for the appno8000,3000
aws_elb_listen_portLoad balancer listening port. Defaults to 80 if NO FQDN provided, 443 if FQDN providedno443,3000
namedescription
aws_vpc_idThe selected VPC ID used.
vm_urlThe URL of the generated app
instance_endpointThe URL of the generated ec2 instance
ec2_sg_idSG ID for the EC2 instance