Documentation ¶
Overview ¶
Package dploy is the DC/OS deployment tool for appops.
It supports operations to create, deploy and manage microservices-architecture apps based on a collection of Marathon app specs.
To set the log output level, use the environment variable DPLOY_LOGLEVEL.
For a full guide visit http://dploy.sh
Index ¶
- Constants
- func Destroy(workdir string, showAll bool) bool
- func Download(theURL string, intoDir string) (string, error)
- func DryRun(workdir string, showAll bool) bool
- func Init(workdir string, showAll bool) bool
- func ListResources(workdir string, showAll bool) bool
- func ListRuntimeProperties(workdir string, showAll bool) bool
- func Run(workdir string, showAll bool) bool
- func Scale(workdir string, showAll bool, pid string, instances int) bool
- func Upgrade(workdir string) bool
- type DployApp
Examples ¶
Constants ¶
const ( ENV_VAR_DPLOY_LOGLEVEL string = "DPLOY_LOGLEVEL" ENV_VAR_DPLOY_EXAMPLES string = "DPLOY_EXAMPLES" DEFAULT_DEPLOY_WAIT_TIME time.Duration = 10 APP_DESCRIPTOR_FILENAME string = "dploy.app" DEFAULT_MARATHON_URL string = "http://localhost:8080" DEFAULT_APP_NAME string = "CHANGEME" MARATHON_APP_SPEC_DIR string = "specs/" MARATHON_APP_SPEC_EXT string = ".json" MARATHON_LABEL string = "DPLOY" MARATHON_OBSERVER_TEMPLATE string = "https://raw.githubusercontent.com/mhausenblas/dploy/master/observer/observer.json" MARATHON_OBSERVER_PAT_FILE string = ".pat" RESOURCETYPE_PLATFORM string = "platform" RESOURCETYPE_APP string = "app" RESOURCETYPE_GROUP string = "group" CMD_TRUNCATE int = 17 EXAMPLE_HELLO_WORLD string = "https://raw.githubusercontent.com/mhausenblas/dploy/master/examples/helloworld.json" EXAMPLE_BUZZ string = "https://raw.githubusercontent.com/mhausenblas/dploy/master/examples/buzz/buzz.json" EXAMPLE_WP string = "https://raw.githubusercontent.com/mhausenblas/dploy/master/examples/stateful/wordpress.json" USER_MSG_SUCCESS string = "🙌" USER_MSG_PROBLEM string = "🙁" USER_MSG_INFO string = "🗣" SYSTEM_MSG_ONLINE string = "online \t💚" SYSTEM_MSG_OFFLINE string = "offline\t💔" )
Variables ¶
This section is empty.
Functions ¶
func Destroy ¶
Destroy tears down the app. It scans the `specs/` directory for Marathon app specs and deletes apps using the Marathon API.
func DryRun ¶
DryRun validates the app descriptor by checking if Marathon is reachable and also checks if the app spec directory is present, incl. at least one Marathon app spec.
func Init ¶
Init creates an app descriptor (dploy.app) and the `specs/` directory in the workdir specified as well as copies in example app specs. For example:
dploy.Init("../.")
Example (Output) ¶
Init("/tmp/")
Output: /tmp/dploy.app with following content: marathon_url: http://localhost:8080 app_name: CHANGEME
func ListResources ¶
ListResources lists the resource definitions of the app.
func ListRuntimeProperties ¶
ListRuntimeProperties lists runtime properties of the app.
func Run ¶
Run launches the app as defined in the descriptor and the app specs. It scans the `specs/` directory for Marathon app specs and launches them using the Marathon API.
Types ¶
type DployApp ¶
type DployApp struct { MarathonURL string `yaml:"marathon_url"` AppName string `yaml:"app_name"` RepoURL string `yaml:"repo_url,omitempty"` PublicNode string `yaml:"public_node,omitempty"` TriggerBranch string `yaml:"trigger_branch,omitempty"` }
DployApp is the dploy application deployment descriptor, in short: app descriptor. It defines the connection to the target DC/OS cluster as well as the app properties.