Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Deploy Destinations #96

Open
whitehat101 opened this issue Jun 8, 2014 · 14 comments
Open

Multiple Deploy Destinations #96

whitehat101 opened this issue Jun 8, 2014 · 14 comments

Comments

@whitehat101
Copy link

Have you thought about supporting multiple deploy destinations? I'd like to have a "production" and a "staging" deploy that share common settings (exclude, additional) but have different credentials.

Maybe, have the config as it is now be the "default", and if a deploy name is given, then merge that hash, into the root.

adapter: sftp
path: path/to/deployment

production:
  host: example1.com
  username: user1
  password: pass1

staging:
  host: example2.com
  username: user2
  password: pass2

  additional:
    - config/staging-auth.yml

exclude:
  - .gitignore
  - dandelion.yml
  - dir/

additional:
  - config/auth.yml

Really nice Gem, by the way.

@scttnlsn
Copy link
Owner

scttnlsn commented Jun 8, 2014

I've accomplished this by using multiple config files:

$ dandelion --config=development.yml deploy
$ dandelion --config=production.yml deploy

The config file supports ERB syntax to allow reading from environment variables but perhaps some sort of "partial" support would be nice to eliminate duplicating shared config options.

@colinhahn
Copy link

I'd like to add a vote in support of this feature. We have code for website functionality modules, and those modules appear in several of our sites. As a result, when we update that codebase we need to push the changes to all of the production servers. Being able to do that with a single command would be great.

@AngelinDark
Copy link

I agree with @colinhahn, use a command would be much easier and better.

@scttnlsn
Copy link
Owner

Yeah, perhaps just a generic --merge <name> option could be added. Would that suit everyone's needs?

@scttnlsn
Copy link
Owner

Perhaps a different name though since merge is a term used by Git and could be confusing.

@AngelinDark
Copy link

How about something like "dandelion deploy -m"?
The controller is short and easy to understand.

Do not know if it's possible, can even be mistaken as to what I say, but for the organization deploys possible (keeping the configuration in a single file), it would be better to organize something?

adapter: ftp
path: path/default

servers:
  production:
    host: example1.com
    username: user1
    password: pass1
    path: path/optional

  staging:
    host: example2.com
    username: user2
    password: pass2

    additional:
    - config/staging-auth.yml

exclude:
  - .gitignore
  - dandelion.yml
  - dir/

additional:
  - config/auth.yml

@scttnlsn
Copy link
Owner

Perhaps in that case dandelion deploy -m servers.staging could be used. Also, if the value being merged is a list (i.e. exclude or additional) should the lists be concatenated or overwritten?

@AngelinDark
Copy link

Yes, the command would look perfect that way.
In the list, I think the best would be to concatenate instead of replacing.

@fabianmarz
Copy link

👍

@codewrangler77
Copy link
Contributor

@scttnlsn is this something you've already started on or would you accept a pull request? Have a project that this would be super helpful rather than multiple config files.

@scttnlsn
Copy link
Owner

scttnlsn commented Nov 5, 2014

@codewrangler77 I have not started working on this. A pull request implementing the "merge" option would be awesome!

@bobrocke
Copy link

Multiple destinations would be a great addition allowing deployment to a staging and a productions server, as an example.

Maybe it would look like:

dandelion deploy staging

dandelion deploy prod

with separate sections in the dandelion.yml file for each.

@ogrosko
Copy link

ogrosko commented Apr 2, 2015

I agree with bobrocke
It would be great to use something like:

dandelion deploy staging

dandelion deploy prod

@moesalih
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants