Ask Your Question

Proper structure for project?

asked 2014-04-15 06:47:30 -0600

lex gravatar image

Hi, i have some complex project, using alot of modules (both self-written and public). How i should handle it if i plan to deploy 2 env with this manifests? This two envs is completely similar except hostnames/ips, installing similar software on similar OSes. In current state i can only deploy one stack because it looks like "node railsrole inherits server { lots of classes/code }" and for actual box i write something like "node my.srv.example.tld inherits railsrole" to deploy all stuff for that role. ATM it's not customizable at all - no templates, no variables, etc.

Feels ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-04-15 07:08:36 -0600

Daenney gravatar image

You need to explain a bit better what you're asking, it's like five different things spread out across a few lines.

  1. Describe your current environment, clearly
  2. Describe what you want to achiever, clearly
  3. Why do you feel like node classification with the node type is an issue?
  4. Why do you feel you could not use parameterised classes?
  5. What do you mean, exactly, with classes inside classes?

It would help to have quite a few more, concise, code examples to illustrate each point you're having issues with instead of one hug manifest that people need to figure out for themselves.

edit flag offensive delete link more

answered 2014-04-15 08:01:42 -0600

lex gravatar image

Describe your current environment, clearly

Nothing special, foreman as dashboard with master, bunch of debian / ubuntu agents, signed and working.

Describe what you want to achiever, clearly

I want to deploy several sets of servers (let's call it "stack").
Each stack contains 5-10 VMs with different software.
ATM i have a bunch of classes managing it (let's call it "beta") and it works.
Hovewer, in different scenarios, i want to replace some variables, for example:

class { 'product::apache':  
  hostname => ''  

Should install "apache" role but replace hostname variable somewhere inside apache2.conf from template.

Why do ...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-04-15 06:47:30 -0600

Seen: 77 times

Last updated: Apr 15 '14