linyinli / terraform-custom-deployer

Deliver (Web) Application via traditional deployment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom Deployer

Terraform module which delivers a Web Application artifact to the related Web Server by traditional deployment, powered by Seal/Courier.

Usage

module "custom-deployer" {
  source = "..."

  infrastructure = {
    runtime_source = "https://github.com/seal-io/terraform-provider-courier//pkg/runtime/source_builtin"
  }

  deployment = {
    rolling = {
      max_surge = 0.25
    }
  }

  target = {
    addresses = [...]
    authn = {
      mode   = "ssh"
      user   = "ansible"
      secret = "ansible"  # either password or token.
    }
  }

  artifact = {
    runtime_class = "tomcat"
    refer = {
      uri = "https://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/sample.war"
      ports = [ 80 ]
    }
  }
}

Examples

Contributing

Please read our contributing guide if you're interested in contributing to Walrus template.

Requirements

Name Version
terraform >= 1.0
courier >= 0.0.8

Providers

Name Version
courier >= 0.0.8

Modules

No modules.

Resources

Name Type
courier_deployment.deployment resource
courier_artifact.artifact data source
courier_runtime.runtime data source
courier_target.target data source

Inputs

Name Description Type Default Required
context Receive contextual information. When Walrus deploys, Walrus will inject specific contextual information into this field.

Examples:
context:
project:
name: string
id: string
environment:
name: string
id: string
resource:
name: string
id: string
map(any) {} no
infrastructure Specify the infrastructure information for deploying.

Examples:
infrastructure:
runtime_source: string, optional
object({
runtime_source = optional(string, null)
})
{} no
deployment Specify the deployment action, like scheduling, progress time and so on.

Examples:
deployment:
timeout: number, optional
rolling:
max_surge: number, optional # in fraction, i.e. 0.25, 0.5, 1
object({
timeout = optional(number, 300)
rolling = optional(object({
max_surge = optional(number, 0.25)
}))
})
{
"rolling": {
"max_surge": 0.25
},
"timeout": 300
}
no
artifact Specify the artifact of deployment, like a docker image, a war file and so on.

Examples:
artifact:
runtime_class: string, optional
refer:
uri: string
insecure: bool, optional
authn:
mode: none/bearer/basic
user: string, optional
secret: string, optional
command: string, optional
ports: list(number), optional
envs: map(string), optional
volumes: list(string), optional # used for docker runtime class
object({
runtime_class = optional(string, "tomcat")
refer = object({
uri = string
insecure = optional(bool, false)
authn = optional(object({
mode = optional(string, "none")
user = optional(string)
secret = optional(string)
}))
})
command = optional(string)
ports = optional(list(number))
envs = optional(map(string))
volumes = optional(list(string))
})
n/a yes
target Specify the target of deployment, include the address list of target, authentication information and so on.

Examples:
target:
addresses: list(string)
insecure: bool, optional
authn:
mode: ssh/winrm
user: string
secret: string
proxies:
- address: string
insecure: bool, optional
authn:
mode: proxy/ssh
user: string
secret: string
object({
addresses = list(string)
insecure = optional(bool, false)
authn = object({
mode = optional(string, "ssh")
user = string
secret = string
})
proxies = optional(list(object({
address = string
insecure = optional(bool, false)
authn = object({
mode = string
user = optional(string)
secret = optional(string)
})
})))
})
n/a yes

Outputs

Name Description
context The input context, a map, which is used for orchestration.
refer The refer, a map, which is used for dependencies or collaborations.
connection The connection, a string combined host and port, might be a comma separated string or a single string.
address The address, a string only has host, might be a comma separated string or a single string.
ports The port list of the service.
endpoints The endpoints, a list of string combined host and port.

License

Copyright (c) 2023 Seal, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at LICENSE file for details.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Deliver (Web) Application via traditional deployment.

License:Apache License 2.0


Languages

Language:Shell 74.6%Language:HCL 21.0%Language:Makefile 4.4%