All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 0251852b authored by Dmitry Duplyakin's avatar Dmitry Duplyakin

First (incomplete) draft of the Chef tutorial chapter

- New chapter along with many new screenshots and code-samples
parent fcad5296
This diff is collapsed.
......@@ -56,4 +56,5 @@ Take a look at the @seclink["status-notes"]{status notes}, and then
@include-section["hardware.scrbl"]
@include-section["planned.scrbl"]
@include-section["cloudlab-tutorial.scrbl"]
@include-section["chef-on-cloudlab-tutorial.scrbl"]
@include-section["getting-help.scrbl"]
......@@ -37,7 +37,7 @@ This tutorial assumes that:
]}
]
@section{Logging In}
@section[#:tag "tutorial-logging-in"]{Logging In}
The first step is to log in to @(tb); @(tb) is available to all
researchers and educators who work in cloud computing. If you have
......
sudo cat /root/.chefauth
#
# Cookbook Name:: emulab-nfs
# Recipe:: default
#
if node['hostname'] == node["nfs"]["server"]
include_recipe "emulab-nfs::export"
else
include_recipe "emulab-nfs::mount"
end
root@head:~# knife node run_list add head "role[apache2]"
head:
run_list:
role[nfs]
role[apache2]
root@head:~# knife ssh "name:*" chef-client
apt155.apt.emulab.net Starting Chef Client, version 12.7.2
apt154.apt.emulab.net Starting Chef Client, version 12.4.1
apt155.apt.emulab.net resolving cookbooks for run list:
["emulab-nfs", "apache2", "apache2::mod_autoindex", "emulab-apachebench"]
apt154.apt.emulab.net resolving cookbooks for run list:
["emulab-nfs", "apache2", "apache2::mod_autoindex"]
apt155.apt.emulab.net Synchronizing Cookbooks:
apt155.apt.emulab.net Compiling Cookbooks...
apt154.apt.emulab.net Synchronizing Cookbooks:
....
apt155.apt.emulab.net Running handlers:
apt155.apt.emulab.net Running handlers complete
apt155.apt.emulab.net Chef Client finished, 5/123 resources updated in 04 seconds
knife ssh "role:apachebench" chef-client
root@head:~# knife ssh "name:*" 'netstat -ntpl | grep 8080'
apt154.apt.emulab.net tcp6 0 0 :::8080 :::* LISTEN 2 7664/apache2
apt155.apt.emulab.net tcp6 0 0 :::8080 :::* LISTEN 9 808/apache2
# List files in the NFS directory /exp-share on head; should be empty
ls /exp-share/
# List the same directory remotely on node-0; also empty
ssh node-0 ls /exp-share/
# Create an empty file in this derectory locally
touch /exp-share/NFS-is-configured-by-Chef!
# Find the same file on node-0
ssh node-0 ls /exp-share/
#
# This role depends on the emulab-nfs cookbook;
# emulab-nfs depends on the nfs cookbook
# available at: https://supermarket.chef.io/cookbooks/nfs
# Make sure it is installed; If it is not, try: knife cookbook site install nfs
#
name "nfs"
description "Role applied to all NFS nodes - server and client"
override_attributes(
"nfs" => {
"server" => "head",
"dir" => "/exp-share",
"export" => {
"network" => "10.0.0.0/8",
"writeable" => true
}
}
)
run_list [ "emulab-nfs" ]
root@head:~# knife node run_list add node-0 "role[apache2]"
node-0:
run_list:
role[nfs]
role[apache2]
root@head:~# knife node run_list add node-0 "role[apachebench]"
node-0:
run_list:
role[nfs]
role[apache2]
role[apachebench]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment