Documentation ¶
Index ¶
- Constants
- Variables
- func BuildFunctionForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, ...) error
- func BuildImageForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, ...) error
- func BuildServiceForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, ...) error
- func DeployFunctionForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, ...) error
- func DeployInfrastructureForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, ...) error
- func DeployServiceForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, ...) error
- func NewConfig(log *log.Logger, targetEnv Env, awsCredentials devdeploy.AwsCredentials) (*devdeploy.Config, error)
- func NewFunction(log *log.Logger, funcName string, cfg *devdeploy.Config) (*devdeploy.ProjectFunction, error)
- func NewImage(log *log.Logger, imageName string, cfg *devdeploy.Config) (*devdeploy.ProjectImage, error)
- func NewService(log *log.Logger, serviceName string, cfg *devdeploy.Config) (*devdeploy.ProjectService, error)
- func RunSchemaMigrationsForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, ...) error
- type Env
- type Function
- type Image
- type Service
Constants ¶
const ( // ProjectNamePrefix will be appending to the name of the project. ProjectNamePrefix = "gitw-" // GitLabProjectBaseUrl is the base url used to create links to a specific CI/CD job or pipeline by ID. GitLabProjectBaseUrl = "https://gitlab.com/geeks-accelerator/oss/devops" // EnableRdsServerless will use the Aurora database engine that scales the capacity based on database load. This is // a good option for intermittent or unpredictable workloads. EnableRdsServerless = true // EnableElasticCache will include a Redis Elastic Cluster. EnableElasticCache = false )
const ( // EnableServiceElb will enable all services to be deployed with an ELB (Elastic Load Balancer). // This will only be applied to the prod env, but the logic can be changed in the code below. // // When enabled each service will require it's own ELB and therefore will add $20~ month per service when // this is enabled. The hostnames defined for the service will be updated in Route53 to resolve to the ELB. // If HTTPS is enabled, the ELB will be created with an AWS ACM certificate that will support SSL termination on // the ELB, all traffic will be sent to the container as HTTP. // This can be configured on a by service basis. // // When not enabled, tasks will be auto assigned a public IP. As ECS tasks for the service are launched/terminated, // the task will update the hostnames defined for the service in Route53 to either add/remove its public IP. This // option is good for services that only need one container running. EnableServiceElb = false // EnableServiceAutoscaling will enable all services to be deployed with an application scaling policy. This should // typically be enabled for front end services that have an ELB enabled. EnableServiceAutoscaling = false )
Variables ¶
var EnvNames = []Env{ EnvDev, EnvStage, EnvProd, }
List of env names used by main.go for help.
var FunctionNames = []Function{ FunctionDatadogLogcollector, }
List of function names used by main.go for help and append the functions to config.
var ImageNames = []Image{ ImageGoImagemagick7, }
List of images names used by main.go for help and append the functions to config.
var ServiceNames = []Service{ ServiceGoWebApi, }
List of service names used by main.go for help and append the services to config.
Functions ¶
func BuildFunctionForTargetEnv ¶
func BuildFunctionForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, functionName, releaseTag string, dryRun, noCache, noPush bool) error
BuildFunctionForTargetEnv executes the build commands for a target function.
func BuildImageForTargetEnv ¶ added in v1.0.19
func BuildImageForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, imageName, releaseTag string, dryRun, noCache, noPush bool) error
BuildImageForTargetEnv executes the build commands for a target image.
func BuildServiceForTargetEnv ¶
func BuildServiceForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, serviceName, releaseTag string, dryRun, noCache, noPush bool) error
BuildServiceForTargetEnv executes the build commands for a target service.
func DeployFunctionForTargetEnv ¶
func DeployFunctionForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, functionName, releaseTag string, dryRun bool) error
DeployFunctionForTargetEnv executes the deploy commands for a target function.
func DeployInfrastructureForTargetEnv ¶ added in v1.0.13
func DeployInfrastructureForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, dryRun bool) error
DeployInfrastructureForTargetEnv executes the deploy commands for a target function.
func DeployServiceForTargetEnv ¶
func DeployServiceForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, serviceName, releaseTag string, dryRun bool) error
DeployServiceForTargetEnv executes the build commands for a target service.
func NewConfig ¶ added in v1.0.13
func NewConfig(log *log.Logger, targetEnv Env, awsCredentials devdeploy.AwsCredentials) (*devdeploy.Config, error)
NewConfig defines the details to setup the target environment for the project to build services and functions.
func NewFunction ¶ added in v1.0.13
func NewFunction(log *log.Logger, funcName string, cfg *devdeploy.Config) (*devdeploy.ProjectFunction, error)
NewFunction returns the *devdeploy.ProjectFunction.
func NewImage ¶ added in v1.0.19
func NewImage(log *log.Logger, imageName string, cfg *devdeploy.Config) (*devdeploy.ProjectImage, error)
NewImage returns the *devdeploy.ProjectImage.
func NewService ¶ added in v1.0.13
func NewService(log *log.Logger, serviceName string, cfg *devdeploy.Config) (*devdeploy.ProjectService, error)
NewService returns the ProjectService for a service that is configured for the target deployment env.
func RunSchemaMigrationsForTargetEnv ¶
func RunSchemaMigrationsForTargetEnv(log *log.Logger, awsCredentials devdeploy.AwsCredentials, targetEnv Env, isUnittest bool) error
RunSchemaMigrationsForTargetEnv executes schema migrations for the target environment.
Types ¶
type Function ¶
type Function = string
Function define the name of a function.
var (
FunctionDatadogLogcollector Function = "datadog-logcollector"
)