containx / depcon Goto Github PK
View Code? Open in Web Editor NEWDocker blue-green/deployment/management supporting Mesos/Marathon and Compose.
Home Page: http://depcon.containx.io
License: Apache License 2.0
Docker blue-green/deployment/management supporting Mesos/Marathon and Compose.
Home Page: http://depcon.containx.io
License: Apache License 2.0
This is to support docker-compose basic commands as well as compose file formats.
TAG
substitution within compose files the same way depcon handles marathon service descriptors.The docker-compose example seems more thorough.
I don't see a section listing all possible
depcon app
commands. I also don't see how to start an app, just delete or refresh it.
Whenever triggering a "depcon app create" using a marathon description file (eg: marathon.json) with a healthcheck using the "port" attribute, the application will get deployed but the health check used is not reflecting the predefined healthcheck definition in the marathon description file. During the creation it ignores the "port" attribute and falls back on the default "portIndex"
Looking at the schema.json it seems the "Port" definition is already in there, only it isn't yet configured to be used by struct.go or event_types.go
Is it possible implement 0downtime rollout of docker containers using depcon, apache mesos and marathon?
Hi,
I've set my portMappings as below:
portMappings:
- containerPort: 80
servicePort: ${SERVICE_PORT}
protocol: tcp
But I'm unable to create an application with servicePort as a variable due to:
2017-02-27 08:43:01 ERROR [depcon]: error unmarshaling JSON: json: cannot unmarshal string into Go value of type int
Is there any way to convert this value to an integer?
In DC/OS you communicate with Marathon through the admin router and to do so you need to authenticate yourself with a token, it would be nice if depcon would have a token auth configuration to support DC/OS.
Admin router reads the token from an header:
header: “Authorization: token=my_token"
Currently depcon does not support the notion of updating a group within. This issue is to add the same behaviors with groups as we have within applications
At least while experimenting, i'd like to be able to use depcon without requiring end users to know about it. Our company has decided that docker-compose.yml will be our lingua franca for describing microservices apps.
Is there a way to use depcon to run a compose file on marathon or even better, to convert a compose file to a series of marathon .json job files?
k
I'm trying to deploy one app to marathon and my json has some internal variable managed by marathon like: $HOST, $PORT0 and $PORT1, but depcon try to replace with instance variable when upload file and show some errors....I need a way to scape these variable...
My app.json:
{
"id": "appname",
"cpus": "0.1",
"mem": "256",
"instances": 1,
"cmd": "./bin/spark-class org.apache.spark.deploy.mesos.MesosClusterDispatcher --master zk://localhost:2181/mesos --zk localhost:2181 --host $HOST --port $PORT0 --webui-port $PORT1 --name spark_marathon_framework_name",
"env": {
"SPARK_USER": "root",
"HADOOP_HOME": "/usr/lib/hadoop"
},
"ports": [
32000,
0
],
"container": {
"type": "DOCKER",
"docker": {
"image": "registry/myimage:latest",
"network": "HOST"
},
"volumes": [
{
"containerPath": "/etc/localtime",
"hostPath": "/etc/localtime",
"mode": "RO"
},
{
"containerPath": "/etc/hadoop/conf",
"hostPath": "spark_marathon_hadoop_conf_dir",
"mode": "RO"
},
{
"containerPath": "/usr/lib/hadoop",
"hostPath": "/usr/lib/hadoop",
"mode": "RO"
}
]
},
"healthChecks": [
{
"path": "/",
"portIndex": 1,
"protocol": "HTTP",
"gracePeriodSeconds": 5,
"intervalSeconds": 60,
"timeoutSeconds": 10,
"maxConsecutiveFailures": 3
}
], "_hack": null
}
I keep getting the following error when I run 'go get -v github.com/gondor/depcon'
Error:
work/src/github.com/docker/libcompose/docker/container.go:478: undefined: parsers.ParseRepositoryTag
work/src/github.com/docker/libcompose/docker/container.go:480: undefined: "github.com/docker/docker/utils".ImageReference
I'm running on golang version
ubuntu --> go version go1.5.2 linux/amd64
osX --> go version go1.5.2 darwin/amd64
How can i resolve these compile time issues? Talk to you soon
Best Regards,
John Montoya
I'm unable to get the logs of an app.
depcon -e develop app log app_id
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x28 pc=0x5be02b]
goroutine 1 [running]:
panic(0xadc060, 0xc820010110)
/Users/junruh/go/src/runtime/panic.go:464 +0x3e6
github.com/ContainX/go-mesoslog/mesoslog.(*MesosClient).GetAppNameForTaskID(0x0, 0xc8203820a0, 0x42, 0x0, 0x0, 0x0, 0x0)
/Users/junruh/Development/golang/src/github.com/ContainX/go-mesoslog/mesoslog/client.go:124 +0x4b
github.com/ContainX/depcon/commands/marathon.getMesosAppIdentifier(0xf81d60, 0x0, 0x7ffdc657e4ee, 0x1e, 0x0, 0x0)
/Users/junruh/Development/golang/src/github.com/ContainX/depcon/commands/marathon/app_log_cmds.go:86 +0x1ef
github.com/ContainX/depcon/commands/marathon.showLogCmd(0xf81d60, 0xc82030bda0, 0x1, 0x3)
/Users/junruh/Development/golang/src/github.com/ContainX/depcon/commands/marathon/app_log_cmds.go:48 +0x1a8
github.com/spf13/cobra.(*Command).execute(0xf81d60, 0xc82031cc00, 0x3, 0x4, 0x0, 0x0)
/Users/junruh/Development/golang/src/github.com/spf13/cobra/command.go:499 +0x85a
github.com/spf13/cobra.(*Command).Execute(0xf7ee20, 0x0, 0x0)
/Users/junruh/Development/golang/src/github.com/spf13/cobra/command.go:582 +0x46a
github.com/ContainX/depcon/commands.executeWithExistingConfig()
/Users/junruh/Development/golang/src/github.com/ContainX/depcon/commands/depcon.go:138 +0x35d
github.com/ContainX/depcon/commands.Execute()
/Users/junruh/Development/golang/src/github.com/ContainX/depcon/commands/depcon.go:77 +0x1ce
main.main()
/Users/junruh/Development/golang/src/github.com/ContainX/depcon/main.go:26 +0x66
App-Id was removed to protect the innocent. The App-Id i'm using must be correct because depcon app get
is working. All other commands are working as well.
Any Ideas?
The --wait
option for a marathon deployments uses a hard-coded 90 second value. If the application is not healthy within 90 seconds depcon exits with an error. Some of our services take more than the default of 90 seconds to start. It would be nice if we could override this value if the application is known to take more than 90 seconds to start.
Another idea would be to look at the gracePeriodSeconds for any defined marathon health-check, and if present use this as the default wait time.
Can you write little tutorial with depcon work example?
Currently depcon requires a config file to be created on disk (whether through it's wizard) or by the user. This makes it difficult to deploy in 3rd party build systems when we want server information protected.
This issue adds the following initial behavior for Marathon
Setting the following variables as an example:
DEPCON_MODE=marathon
MARATHON_HOST=http://host:port
MARATHON_USER=optional auth user
MARATHON_PASS=optional password
It would be nice if depcon exited with a non-zero return code when an application was not successfully deployed because a defined ${PARAM} could not be substituted.
See example below:
$ depcon app create marathon.json --ignore=false
2016-03-25 18:16:46 WARNING [depcon]: Cannot find a value for varible ${test} which was defined in marathon.json
$ echo $?
0
This would allow for more seamless failure detection when automating deployments with depcon.
I have a marathon deployment using mantl which uses aws loadbalancing and self-signed certs.
depcon -e dev mar app list
2016-04-14 14:56:49 ERROR [depcon]: Get https://k4b4-mantl-control-01.node.c1.io/marathon/v2/apps: x509: certificate is valid for localhost, *.node.consul, *.service.consul, not k4b4-mantl-control-01.node.c1.io
Maybe there should be an option to allow self-signed certs to be accepted.
I can browse to this page fine, there is just an insecure ssl connection browser warning.
app scale [applicationId] [instances]
has no effect when providing 0
instances. Works with any other value. However it seems that the Marathon API does not return an error so the depcon
CLI returns the generated DEPLOYMENT_ID
which never reaches the cluster.
Tried using the compose functionality. The certifier container is a locally built container.
$ depcon --verbose compose up certifier
INFO[0000] Project [depcon_proj]: Starting project
INFO[0000] [0/8] [certifier]: Starting
Pulling repository docker.io/library/depcon_proj_certifier
ERRO[0003] Failed to pull image depcon_proj_certifier:latest: Error: image library/depcon_proj_certifier not found
ERRO[0003] Failed Starting certifier : Error: image library/depcon_proj_certifier not found
ERRO[0003] Failed to start: certifier : Error: image library/depcon_proj_certifier not found
2016-03-16 12:31:25 ERROR [depcon]: Error: image library/depcon_proj_certifier not found
This issue is to enhance Depcon to support the blue/green logic normally found in Marathon-LB bluegreen_deploy.py
. This will allow you to create/update applications as before with the option to blue/green deploy.
http://blog.docker.com/2015/11/docker-multi-host-networking-ga/
After 1.9 release docker supports 'docker network create' command.
Is it possible to rollout several docker containers in one network with depcon?
I'm on go v1.6 which says setting the
GO15VENDOREXPERIMENT is no longer needed.
The final line of output for
go get -v github.com/gondor/depcon
is
../../work/src/github.com/gondor/depcon/compose/compose_wrapper.go:108: cannot range over c.project.Configs (type *config.Configs)
Could you confirm if this is an actual problem or update the docs to mention it?
I'm using brew installed go on a mac, updated today
> go version go1.6 darwin/amd64```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.