Created windows instance using chef along with require application


#1

Hi Team,

We are able to create ec2 (linux) instance using knife ec2 command along with
created recipe.

Now, the same way i need to create windows machine along with below
application.

  1. Java
  2. tomact
  3. mysql
  4. IIS

Can anyone please help me for the same. Since i am only able to create windows
machin using knife ec2 command but not known how to install the above
application on created windows machine in the same command.

Please assist on high priority.

Regards,
Vishal Totare


#2

Any update…

On Sat, Apr 5, 2014 at 11:45 PM, Vishal Totare totare.vishal@gmail.comwrote:

Hi Team,

We are able to create ec2 (linux) instance using knife ec2 command along
with
created recipe.

Now, the same way i need to create windows machine along with below
application.

  1. Java
  2. tomact
  3. mysql
  4. IIS

Can anyone please help me for the same. Since i am only able to create
windows
machin using knife ec2 command but not known how to install the above
application on created windows machine in the same command.

Please assist on high priority.

Regards,
Vishal Totare


#3

Vishal,

Have you created cookbooks for each of your components (java, tomcat,
mysql, and iis)? Or have you found cookbooks that will do what you want
for each of these?

If not, that’s the place to start. You might find that these cookbooks
from the community site offer some good patterns for how to build your
cookbooks. You might even be able to use these directly.

Once you’ve created the necessary cookbooks, you’ll be able to specify the
run list using ‘-r’ flag for run list. Using this, you’ll specify the
comma separated list of roles/recipes to apply.

For example, something like:

knife ec2 server create -r
"recipe[java],recipe[tomcat],role[database],role[webserver]"

Good luck!
Nathen

On Sat, Apr 5, 2014 at 2:15 PM, Vishal Totare totare.vishal@gmail.comwrote:

Hi Team,

We are able to create ec2 (linux) instance using knife ec2 command along
with
created recipe.

Now, the same way i need to create windows machine along with below
application.

  1. Java
  2. tomact
  3. mysql
  4. IIS

Can anyone please help me for the same. Since i am only able to create
windows
machin using knife ec2 command but not known how to install the above
application on created windows machine in the same command.

Please assist on high priority.

Regards,
Vishal Totare


#4

Hi Nathen,

Thanks!!

As suggested, For mysql cookbook have performed the below steps.

  1. Using below command, have downloaded the mysql cookbook.

knife cookbook site download mysql 5.0.2

  1. Then executed the same in cookbooks folder.

tar -xzvf mysql -C cookbooks/

  1. Uploaded the same.

knife cookbook upload mysql

  1. Added the run_list in my chef-server using below command.

knife node run_list add target1 “recipe[mysql]”

  1. Then added recipe in role & then uploaded the role too.

knife role from file base-windows.rb

  1. And the last executed the below command to create node in my AWS
    environment.

knife ec2 server create “role[base-windows]” --region=us-west-2

–availability-zone=us-west-2a --image ami-20147a10 --flavor=t1.micro
–groups chef_communicator -i ~/.ssh/chef-client.pem --node-name
knife_windows_node_mysql

Afterwards waiting for winram is taking too much time & have seen in the
console as machine has been created but whatever role we need to define
that will not be apply to my created windows instance. Means when i
physically checked the java, ntp, mysql service in my services.msc then
unable to find it.

So, Please help me on this since i performing the same task from last two
days and even unable to get where i can check why waiting for winram is
taking too much time.

Note:- I have already open 22,80,443,3389,3306 port for new windows machine.

Regards,
Vishal Totare

On Sun, Apr 6, 2014 at 3:35 PM, Nathen Harvey nharvey@getchef.com wrote:

Vishal,

Have you created cookbooks for each of your components (java, tomcat,
mysql, and iis)? Or have you found cookbooks that will do what you want
for each of these?

If not, that’s the place to start. You might find that these cookbooks
from the community site offer some good patterns for how to build your
cookbooks. You might even be able to use these directly.

Once you’ve created the necessary cookbooks, you’ll be able to specify the
run list using ‘-r’ flag for run list. Using this, you’ll specify the
comma separated list of roles/recipes to apply.

For example, something like:

knife ec2 server create -r
"recipe[java],recipe[tomcat],role[database],role[webserver]"

Good luck!
Nathen

On Sat, Apr 5, 2014 at 2:15 PM, Vishal Totare totare.vishal@gmail.comwrote:

Hi Team,

We are able to create ec2 (linux) instance using knife ec2 command along
with
created recipe.

Now, the same way i need to create windows machine along with below
application.

  1. Java
  2. tomact
  3. mysql
  4. IIS

Can anyone please help me for the same. Since i am only able to create
windows
machin using knife ec2 command but not known how to install the above
application on created windows machine in the same command.

Please assist on high priority.

Regards,
Vishal Totare


#5

Team,

Any update…

Regards,
Vishal Totare

On Tue, Apr 8, 2014 at 10:48 AM, Vishal Totare totare.vishal@gmail.comwrote:

Hi Nathen,

Thanks!!

As suggested, For mysql cookbook have performed the below steps.

  1. Using below command, have downloaded the mysql cookbook.

knife cookbook site download mysql 5.0.2

  1. Then executed the same in cookbooks folder.

tar -xzvf mysql -C cookbooks/

  1. Uploaded the same.

knife cookbook upload mysql

  1. Added the run_list in my chef-server using below command.

knife node run_list add target1 “recipe[mysql]”

  1. Then added recipe in role & then uploaded the role too.

knife role from file base-windows.rb

  1. And the last executed the below command to create node in my AWS
    environment.

knife ec2 server create “role[base-windows]” --region=us-west-2

–availability-zone=us-west-2a --image ami-20147a10 --flavor=t1.micro
–groups chef_communicator -i ~/.ssh/chef-client.pem --node-name
knife_windows_node_mysql

Afterwards waiting for winram is taking too much time & have seen in the
console as machine has been created but whatever role we need to define
that will not be apply to my created windows instance. Means when i
physically checked the java, ntp, mysql service in my services.msc then
unable to find it.

So, Please help me on this since i performing the same task from last two
days and even unable to get where i can check why waiting for winram is
taking too much time.

Note:- I have already open 22,80,443,3389,3306 port for new windows
machine.

Regards,
Vishal Totare

On Sun, Apr 6, 2014 at 3:35 PM, Nathen Harvey nharvey@getchef.com wrote:

Vishal,

Have you created cookbooks for each of your components (java, tomcat,
mysql, and iis)? Or have you found cookbooks that will do what you want
for each of these?

If not, that’s the place to start. You might find that these cookbooks
from the community site offer some good patterns for how to build your
cookbooks. You might even be able to use these directly.

Once you’ve created the necessary cookbooks, you’ll be able to specify
the run list using ‘-r’ flag for run list. Using this, you’ll specify the
comma separated list of roles/recipes to apply.

For example, something like:

knife ec2 server create -r
"recipe[java],recipe[tomcat],role[database],role[webserver]"

Good luck!
Nathen

On Sat, Apr 5, 2014 at 2:15 PM, Vishal Totare totare.vishal@gmail.comwrote:

Hi Team,

We are able to create ec2 (linux) instance using knife ec2 command along
with
created recipe.

Now, the same way i need to create windows machine along with below
application.

  1. Java
  2. tomact
  3. mysql
  4. IIS

Can anyone please help me for the same. Since i am only able to create
windows
machin using knife ec2 command but not known how to install the above
application on created windows machine in the same command.

Please assist on high priority.

Regards,
Vishal Totare