Showing posts with label chef. Show all posts
Showing posts with label chef. Show all posts

Chef: ERROR: RuntimeError: Please set EDITOR environment variable

I've just setup a workstation on windows, and I'm getting the following error when I try to edit a data bag;

$ knife data bag edit tomhodder tomhodder
ERROR: RuntimeError: Please set EDITOR environment variable

tldr; SOLUTION: use a text editor that understands windows paths ("C:/Users/whatever/file"), rather than unix ("/C/Users/whatever/file"), e.g. export EDITOR=notepad

Chef web app developer training - Part 7 continued even more... checks/real life (draft)


The purpose of this series of tutorials is to take web app developers through the basic knowledge necessary to create and maintain the cookbooks used to deploy web applications.

Here I demonstrate that searches on data bags are applicable to other indexes and lists of objects in the chef server architecture.


Chef web app developer training - Part 7 continued even more (draft)


here are some checks that you have setup the data bag correctly;


Chef web app developer training - Part 7 continued (draft)


The purpose of this series of tutorials is to take web app developers through the basic knowledge necessary to create and maintain the cookbooks used to deploy web applications.

Here we are going to create a data bag which we will shortly be consuming in a cookbook recipe.

We are going to create a databag on class01 named for your favourite sports team and add some players to it.


Chef web app developer training - Part 7 (draft)


The purpose of this series of tutorials is to take web app developers through the basic knowledge necessary to create and maintain the cookbooks used to deploy web applications.

The prerequisites for Part 7 are to have a working setcloud configuration for "class01" and your own hosted chef organization e.g. "tomhodder". ("knife cookbook list" etc, should work)

The purpose of Part 7 is to cover "data bags", what they are and how they work.


Chef developer training - Part 6 continued (draft)

Here we run some checks to ensure the settings are correct

Chef developer training - Part 6 (draft)

The prerequisites for Part 6 are to complete part 5


Chef web app developer tutorial - Part 5 continued (draft)

Check that the environment variables are correctly loaded

 

Chef developer training - Part 5 (draft)

The purpose of this series of tutorials is to take web app developers through the basic knowledge necessary to create and maintain the cookbooks used to deploy web applications.

The prerequisites for Part 5 are to complete part 4, and to have available the configuration values for both "class01" and your own organization e.g. "tomsorg".

The purpose of this part of the tutorial is to make it super easy to switch between different chef-servers, and organizations. The developer workflow will be to typically have a dev or test organization, and some other production target chef-server.

Chef web app developer training - roundup of parts 1-4

These are the requirements to complete for each part of the session; (replace tomhodder with your opscode username where appropriate)


Chef developer training - Part 4 (draft)


The prerequisites for Part 4 are to complete part 3, and to have a username associated with opscode.



Chef developer training (Part 3 steps)


Right now you should have an opscode username, like "tomhodder".

If you are following the tutorials and wish to access the finished versions of the cookbooks, please send your opscode username to me, and I will add you to the "class01" organization.

If you are not following the tutorials, and do not wish to share your opscode username, then please use your alternative organization instead of the "class01" where relevant.

Chef web app developer training - Part 2 (draft)

The purpose of this series of tutorials is to take web app developers through the basic knowledge necessary to create and maintain the cookbooks used to deploy web applications.

Here we create a opscode.com host chef account, which provides a username and organization that we can use for the later tutorial steps. Once you have created the username at opscode, if you send it to me, I will enable it for access to the "class01" organization that contains the cookbooks for this tutorial.

This part of the tutorial is basically to complete the "Using a Chef Repo" tutorial from the learnchef.com getting started series. However it will serve as a basis for the next parts in this series.


Chef developer training - Part 1 continued (draft)

Once you have completed the the Part 1 steps, you should step through the checks below, ensuring that you are able to replicate the commands and actions.

Chef web app developer training - Part 1 steps (draft)

The purpose of this series of tutorials is to take web app developers through the basic knowledge necessary to create and maintain the cookbooks used to deploy web applications.

Here I am using the stack CentOS, Oracle java and tomcat7, but they are generally applicable to the other app stacks.



This part of the tutorial is based off the learnchef.com Chef Workstation Setup getting started article. I'm skipping the Vagrant and VirtualBox installation part until later.


INFO: Chef client is running, will wait for it to finish and then run.

tldr; So I wasted a few hours today because I had changed a setting, (or chef had changed) the location of its lock file (chef-client-running.pid). I found that manually removing the file, and restarting chef was a work-around.