Code Monkey home page Code Monkey logo

depcon's People

Contributors

akatrevorjay avatar connoratherton avatar f1yegor avatar gitter-badger avatar gondor avatar gsideri-ptc avatar junruh avatar michaelkunze avatar shirkevich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

depcon's Issues

Exit with non-zero return code when marathon app creation fails

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.

possible error on depcon install

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```

certificate invalid error for self-signed cert

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.

cannot scale down to 0

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.

Question: converting between compose and marathon files

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

add support for DC/OS

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"

Support for Docker Compose

This is to support docker-compose basic commands as well as compose file formats.

Feature Requirements:

  • Compose execution for all major commands up, kill, rm, ps, restart, stop, start, logs, build, port, etc within Depcon.
  • Darwin, Windows, Linux and Unix compose support within Depcon

    Phase 2 Support - Not included in this issue

  • Ability to use a compose file to launch tasks within Marathon
  • Support for TAG substitution within compose files the same way depcon handles marathon service descriptors.

Scape $ on variable substitution to deploy app json to marathon

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
}

Support Configless option via EnvVars to support Travis and other integration tools

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

unable to compile on OS X Yosemite 10.10.5 or Ubuntu 14.04 LTS

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

Failed Starting certifier : Error: image library/depcon_proj_certifier not found

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

Unable to create a health check on a predefined port in Marathon

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

Feature Request: Configurable wait timeout for marathon

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.

Native Blue/Green support against Marathon-LB

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.

Support Group Updates in Marathon

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

Unable to get application logs

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?

cannot unmarshal servicePort from variable

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?

0-time deployment feature

Is it possible implement 0downtime rollout of docker containers using depcon, apache mesos and marathon?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.