It is possible use One workstation for multiple servers


#1

Hello Guys,

Sorry for the beginner questions I keep asking recently. :smiley: I am a beginner
anyways :wink:

We have opted for hosted chef , and in another thread here, I passed a
comment on using using ansible local/test/experiments stuff and I was
advised to stick to one. In an attempt of doing that I realized I am more
comfortable with a local community chef server installed on premise in our
office.

I am wondering whether I can still use my machine and kind of repeat some
of the things I will be doing online on the local chef server since that
machine as a workstation is tied to the live chef server.

Thanks in advance and Best Regards,

Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves…


#2

On Tuesday, July 7, 2015 at 12:58 PM, Joseph Djomeda wrote:

Hello Guys,

Sorry for the beginner questions I keep asking recently. :smiley: I am a beginner anyways :wink:

We have opted for hosted chef , and in another thread here, I passed a comment on using using ansible local/test/experiments stuff and I was advised to stick to one. In an attempt of doing that I realized I am more comfortable with a local community chef server installed on premise in our office.
There are several ways to do this.

  1. knife will look in your current working directory and up for a .chef directory with your config file. So you just have one top level directory for each Chef server you want to talk to. Note that this uses the PWD environment variable (if set, otherwise it falls back to what the OS provides), so you can symlink in projects (like a chef repo or individual cookbooks) to avoid having multiple copies and it will do the right thing.

  2. Chef config files are just ruby code, so you can define multiple configurations in one knife config, and set an environment variable to choose which one you want. If you do this, you might want to add the variable to your terminal prompt so you know which server you’re talking to.

  3. Use a tool like https://github.com/trobrock/chefvm

  4. Specify the config file with the -c option all the time.

There could be still others, but these are the ones I can remember off the top of my head. I personally use option 1.

Thanks in advance and Best Regards,

Joseph Kodjo-Kuma Djomeda


Daniel DeLeo


#3

There’s also the knife block plug-in

On Tue, Jul 7, 2015 at 1:18 PM, Daniel DeLeo dan@kallistec.com wrote:

On Tuesday, July 7, 2015 at 12:58 PM, Joseph Djomeda wrote:

Hello Guys,

Sorry for the beginner questions I keep asking recently. :smiley: I am a
beginner anyways :wink:

We have opted for hosted chef , and in another thread here, I passed a
comment on using using ansible local/test/experiments stuff and I was
advised to stick to one. In an attempt of doing that I realized I am more
comfortable with a local community chef server installed on premise in our
office.
There are several ways to do this.

  1. knife will look in your current working directory and up for a .chef
    directory with your config file. So you just have one top level directory
    for each Chef server you want to talk to. Note that this uses the PWD
    environment variable (if set, otherwise it falls back to what the OS
    provides), so you can symlink in projects (like a chef repo or individual
    cookbooks) to avoid having multiple copies and it will do the right thing.

  2. Chef config files are just ruby code, so you can define multiple
    configurations in one knife config, and set an environment variable to
    choose which one you want. If you do this, you might want to add the
    variable to your terminal prompt so you know which server you’re talking to.

  3. Use a tool like https://github.com/trobrock/chefvm

  4. Specify the config file with the -c option all the time.

There could be still others, but these are the ones I can remember off the
top of my head. I personally use option 1.

Thanks in advance and Best Regards,

Joseph Kodjo-Kuma Djomeda


Daniel DeLeo


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com


#4

You can use the knife block plugin to manage different knife.rb files that point to different Chef servers.

Chris

From: Yoshi Spendiff [mailto:yoshi.spendiff@indochino.com]
Sent: Tuesday, July 07, 2015 5:27 PM
To: chef
Subject: [chef] Re: Re: It is possible use One workstation for multiple servers

There’s also the knife block plug-in

On Tue, Jul 7, 2015 at 1:18 PM, Daniel DeLeo <dan@kallistec.commailto:dan@kallistec.com> wrote:
On Tuesday, July 7, 2015 at 12:58 PM, Joseph Djomeda wrote:

Hello Guys,

Sorry for the beginner questions I keep asking recently. :smiley: I am a beginner anyways :wink:

We have opted for hosted chef , and in another thread here, I passed a comment on using using ansible local/test/experiments stuff and I was advised to stick to one. In an attempt of doing that I realized I am more comfortable with a local community chef server installed on premise in our office.
There are several ways to do this.

  1. knife will look in your current working directory and up for a .chef directory with your config file. So you just have one top level directory for each Chef server you want to talk to. Note that this uses the PWD environment variable (if set, otherwise it falls back to what the OS provides), so you can symlink in projects (like a chef repo or individual cookbooks) to avoid having multiple copies and it will do the right thing.

  2. Chef config files are just ruby code, so you can define multiple configurations in one knife config, and set an environment variable to choose which one you want. If you do this, you might want to add the variable to your terminal prompt so you know which server you’re talking to.

  3. Use a tool like https://github.com/trobrock/chefvm

  4. Specify the config file with the -c option all the time.

There could be still others, but these are the ones I can remember off the top of my head. I personally use option 1.

Thanks in advance and Best Regards,

Joseph Kodjo-Kuma Djomeda


Daniel DeLeo


Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.commailto:yoshi.spendiff@indochino.com


#5

Hello Guys,

Thanks for all your answers. I have run to some issues with some servers ,
So I have not gotten real time to work on this.

I will revert as soon as possible.

Thanks

On Tue, Jul 7, 2015 at 9:38 PM Fouts, Chris Chris.Fouts@sensus.com wrote:

You can use the knife block plugin to manage different knife.rb files
that point to different Chef servers.

Chris

From: Yoshi Spendiff [mailto:yoshi.spendiff@indochino.com]
Sent: Tuesday, July 07, 2015 5:27 PM
To: chef
Subject: [chef] Re: Re: It is possible use One workstation for multiple
servers

There’s also the knife block plug-in

On Tue, Jul 7, 2015 at 1:18 PM, Daniel DeLeo dan@kallistec.com wrote:

On Tuesday, July 7, 2015 at 12:58 PM, Joseph Djomeda wrote:

Hello Guys,

Sorry for the beginner questions I keep asking recently. :smiley: I am a
beginner anyways :wink:

We have opted for hosted chef , and in another thread here, I passed a
comment on using using ansible local/test/experiments stuff and I was
advised to stick to one. In an attempt of doing that I realized I am more
comfortable with a local community chef server installed on premise in our
office.
There are several ways to do this.

  1. knife will look in your current working directory and up for a .chef
    directory with your config file. So you just have one top level directory
    for each Chef server you want to talk to. Note that this uses the PWD
    environment variable (if set, otherwise it falls back to what the OS
    provides), so you can symlink in projects (like a chef repo or individual
    cookbooks) to avoid having multiple copies and it will do the right thing.

  2. Chef config files are just ruby code, so you can define multiple
    configurations in one knife config, and set an environment variable to
    choose which one you want. If you do this, you might want to add the
    variable to your terminal prompt so you know which server you’re talking to.

  3. Use a tool like https://github.com/trobrock/chefvm

  4. Specify the config file with the -c option all the time.

There could be still others, but these are the ones I can remember off the
top of my head. I personally use option 1.

Thanks in advance and Best Regards,

Joseph Kodjo-Kuma Djomeda


Daniel DeLeo

Yoshi Spendiff

Ops Engineer

Indochino

Mobile: +1 778 952 2025

Email: yoshi.spendiff@indochino.com


Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves…