¿Cómo instalar Chef en Ubuntu 18?

Aprenda a instalar Chef en Ubuntu…

Chef es una herramienta de gestión de configuración basada en Ruby. Se utiliza para automatizar la gestión de configuraciones en todos los nodos del clúster y mantener la coherencia. Hay tres componentes principales de Chef.

  • servidor de chef
  • Puesto de trabajo
  • Nodos

Todas las configuraciones se gestionan desde las estaciones de trabajo y luego se envían al chef-servidor. El servidor Chef es el almacén centralizado de todas las configuraciones de infraestructura. Knife es una herramienta de línea de comandos presente en una estación de trabajo que se utiliza para interactuar con Chef Server. Los nodos ejecutan clientes chef que solicitan información de configuración del servidor chef.

Así es como se ve una arquitectura típica de Chef:

chef de arquitectura

Ahora sigamos adelante y configuremos Chef Server, Workstation y Node (Chef Client).

Detalles del entorno

Estoy usando 3 sistemas Ubuntu 18.04. Uno actuará como servidor chef, el siguiente será una estación de trabajo y un tercer sistema será el nodo.

Chef servidor

  • Nombre de host: chef-geekflare
  • Dirección IP: 192.168.0.107

Puesto de trabajo

  • Nombre de host: estación de trabajo
  • Dirección IP: 192.168.0.108

Nodo

  • Nombre de host: cliente-nodo
  • Dirección IP: 192.168.0.109

Antes de comenzar la instalación, necesito editar el /etc/hosts archivo de todos los sistemas para que puedan resolverse entre sí. Editar el /etc/hosts en todos los sistemas, como se muestra a continuación.

[email protected]:~$ 
127.0.0.1 localhost 
127.0.1.1 geekflare 
192.168.0.107 chef-geekflare 
192.168.0.108 chef-workstation 
192.168.0.109 client-node

Ejecutaré el siguiente comando en los tres sistemas para actualizarlos.

[email protected]:~$ sudo apt update

[sudo] password for geekflare:

Hit:1 http://security.ubuntu.com/ubuntu cosmic-security InRelease

Get:2 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]     

Hit:3 http://ppa.launchpad.net/ansible/ansible/ubuntu cosmic InRelease        

Hit:4 http://us.archive.ubuntu.com/ubuntu cosmic InRelease                    

Get:5 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [9,594 B]

Hit:6 http://us.archive.ubuntu.com/ubuntu cosmic-updates InRelease            

Hit:7 http://us.archive.ubuntu.com/ubuntu cosmic-backports InRelease          

Get:8 http://apt.puppetlabs.com bionic InRelease [85.3 kB]                    

Get:9 http://apt.puppetlabs.com bionic/puppet6 amd64 Packages [32.4 kB]

Fetched 192 kB in 2s (84.6 kB/s)   

Reading package lists... Done

Building dependency tree      

Reading state information... Done

233 packages can be upgraded. Run 'apt list --upgradable' to see them.

Instalación del Servidor Chef

Chef Server es un componente de la arquitectura que conecta la estación de trabajo y los nodos. Cuando las configuraciones se editan/cambian en una estación de trabajo, se envían al chef-servidor y todos los nodos extraen estos cambios de configuración del Chef Server.

Ahora, ejecutemos el siguiente comando para descargar el paquete chef-server.

[email protected]:~$ wget https://packages.chef.io/files/stable/chef-server/13.0.17/ubuntu/18.04/chef-server-core_13.0.17-1_amd64.deb

--2019-10-23 04:04:35-- https://packages.chef.io/files/stable/chef-server/13.0.17/ubuntu/18.04/chef-server-core_13.0.17-1_amd64.deb

Saving to: ‘chef-server-core_13.0.17-1_amd64.deb’

chef-server-core_13 100%[===================>] 240.58M 1.33MB/s in 6m 16s 

2019-10-23 04:10:51 (656 KB/s) - ‘chef-server-core_13.0.17-1_amd64.deb’ saved [252269838/252269838]

Ahora necesita ejecutar el siguiente comando para instalar el servidor Chef.

[email protected]:~$ sudo dpkg -i chef-server-core_*.deb

chef-server-ctl es una utilidad de línea de comandos en chef-server. Usaré esta utilidad para iniciar los servicios del chef-servidor.

[email protected]:~$ sudo chef-server-ctl reconfigure

Running handlers:

Running handlers complete

Chef Infra Client finished, 481/1028 resources updated in 04 minutes 08 seconds

Chef Server Reconfigured!

Puede verificar el estado de los servicios que han comenzado usando el siguiente comando.

[email protected]:~$ sudo chef-server-ctl status

run: bookshelf: (pid 2452) 822s; run: log: (pid 29553) 951s

run: nginx: (pid 2318) 826s; run: log: (pid 30216) 908s

run: oc_bifrost: (pid 2296) 827s; run: log: (pid 29240) 996s

run: oc_id: (pid 2304) 826s; run: log: (pid 29308) 979s

run: opscode-erchef: (pid 2511) 822s; run: log: (pid 29707) 946s

run: opscode-expander: (pid 2416) 822s; run: log: (pid 29412) 958s

run: opscode-solr4: (pid 2393) 824s; run: log: (pid 29358) 964s

run: postgresql: (pid 2264) 827s; run: log: (pid 28769) 1021s

run: rabbitmq: (pid 3183) 792s; run: log: (pid 30476) 902s

run: redis_lb: (pid 30011) 926s; run: log: (pid 30010) 926s

Crear usuario y organización

El servidor Chef conecta la estación de trabajo y los nodos del cliente. Para vincularlos, crearé un administrador y un organizador con sus claves privadas.

En primer lugar, cree un directorio .chef para almacenar las claves.

[email protected]:~$ mkdir .chef

Ahora, usaré chef-server-ctl para crear un usuario. En el siguiente comando, chefadmin es el usuario, Chef es el nombre, GeekFlare es el apellido, [email protected] es la identificación del correo electrónico, geekflare es la contraseña, chefadmin.pen es la clave RSA.

[email protected]:~$ sudo chef-server-ctl user-create chefadmin Chef GeekFlare chef[email protected] 'geekflare' --filename ~/.chef/chefadmin.pem

Ejecutemos un comando para verificar la lista de usuarios en el servidor chef.

[email protected]:~$ sudo chef-server-ctl user-list

chefadmin

pivotal

Ahora, usaré chef-server-ctl para crear una organización. En el siguiente comando, chef-org es el nombre de la organización, Geekflare Chef Infrastructure es el nombre completo de la organización, chefadmin es el usuario que acabamos de crear, chef-org.pem es la clave RSA.

[email protected]:~$ sudo chef-server-ctl org-create chef-org "Geekflare Chef Infrastructure" --association_user chefadmin --filename ~/.chef/chef-org.pem

Ejecutemos un comando para verificar la lista de organizaciones en el servidor chef.

gee[email protected]:~$ sudo chef-server-ctl org-list

chef-org

He instalado el chef-servidor por completo, sigamos adelante e instalemos la estación de trabajo donde se crean todas las configuraciones.

Puesto de trabajo

La estación de trabajo es el lugar donde los usuarios crean libros de cocina. Los libros de cocina no son más que las unidades de configuración que se crean para ejecutar tareas específicas.

Ejecutemos el siguiente comando para descargar el paquete de la estación de trabajo del chef.

[email protected]:~$ wget https://packages.chef.io/files/stable/chef-workstation/0.2.43/ubuntu/18.04/chef-workstation_0.2.43-1_amd64.deb

--2019-10-23 05:37:41-- https://packages.chef.io/files/stable/chef-workstation/0.2.43/ubuntu/18.04/chef-workstation_0.2.43-1_amd64.deb

Resolving packages.chef.io (packages.chef.io)... 151.101.194.110, 151.101.130.110, 151.101.66.110, ...

Connecting to packages.chef.io (packages.chef.io)|151.101.194.110|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 129713682 (124M) [application/x-debian-package]

Saving to: ‘chef-workstation_0.2.43-1_amd64.deb’

chef-workstation_0.2.43-1_ 100%[=======================================>] 123.70M 2.37MB/s in 4m 25s 

2019-10-23 05:42:18 (477 KB/s) - ‘chef-workstation_0.2.43-1_amd64.deb’ saved [129713682/129713682]

Ejecutemos el comando dpkg para instalar una estación de trabajo en el sistema ubuntu.

[email protected]:~$ sudo dpkg -i chef-workstation_*.deb

Selecting previously unselected package chef-workstation.

(Reading database ... 273360 files and directories currently installed.)

Preparing to unpack chef-workstation_0.2.43-1_amd64.deb ...

Unpacking chef-workstation (0.2.43-1) ...

Setting up chef-workstation (0.2.43-1) ...

To run the experimental Chef Workstation App, use your

platform's package manager to install these dependencies:

               libgconf-2.so.4 => not found

You can then launch the App by running 'chef-workstation-app'.

The App will then be available in the system tray.

Thank you for installing Chef Workstation!

You can find some tips on getting started at https://chef.sh/

Ahora ejecutaré un comando para crear un repositorio de chef que tendrá todos los libros de cocina y otros archivos.

[email protected]:~$ chef generate repo chef-repo

Recipe: code_generator::repo

 * directory[/home/geekflare/chef-repo] action create

   - create new directory /home/geekflare/chef-repo

 * template[/home/geekflare/chef-repo/LICENSE] action create_if_missing

   - create new file /home/geekflare/chef-repo/LICENSE

   - update content in file /home/geekflare/chef-repo/LICENSE from none to 3c525c

   (diff output suppressed by config)

 * cookbook_file[/home/geekflare/chef-repo/.chef-repo.txt] action create_if_missing

   - create new file /home/geekflare/chef-repo/.chef-repo.txt

   - update content in file /home/geekflare/chef-repo/.chef-repo.txt from none to 2bed28

   (diff output suppressed by config)

 * cookbook_file[/home/geekflare/chef-repo/README.md] action create_if_missing

   - create new file /home/geekflare/chef-repo/README.md

   - update content in file /home/geekflare/chef-repo/README.md from none to 2b4f46

   (diff output suppressed by config)

 * cookbook_file[/home/geekflare/chef-repo/chefignore] action create_if_missing

   - create new file /home/geekflare/chef-repo/chefignore

   - update content in file /home/geekflare/chef-repo/chefignore from none to 9e2ffd

   (diff output suppressed by config)

 * remote_directory[/home/geekflare/chef-repo/cookbooks] action create_if_missing

   - create new directory /home/geekflare/chef-repo/cookbooks 

Recipe: code_generator::repo

 * cookbook_file[/home/geekflare/chef-repo/cookbooks/README.md] action create_if_missing

   - create new file /home/geekflare/chef-repo/cookbooks/README.md

   - update content in file /home/geekflare/chef-repo/cookbooks/README.md from none to 54b03d

   (diff output suppressed by config)

 * execute[initialize-git] action run

   - execute git init .

 * template[/home/geekflare/chef-repo/.gitignore] action create_if_missing

   - create new file /home/geekflare/chef-repo/.gitignore

   - update content in file /home/geekflare/chef-repo/.gitignore from none to 11e5ee

   (diff output suppressed by config)

ahora voy a crear /chef-repo/.chef directorio, que almacenará todas las configuraciones de cuchillas y las claves RSA.

[email protected]:~$ mkdir ~/chef-repo/.chef

[email protected]:~$ cd chef-repo/ 

Ahora generemos un par de claves RSA. Estamos generando esta clave para autenticar la estación de trabajo y obtener acceso al servidor chef.

[email protected]:~/chef-repo$ ssh-keygen -b 4096

Generating public/private RSA key pair.

Enter file in which to save the key (/home/geekflare/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/geekflare/.ssh/id_rsa.

Your public key has been saved in /home/geekflare/.ssh/id_rsa.pub.

The key fingerprint is:

SHA256:oK/ZyLn+AOMj97F5Z0e1K5o1bxChyKx3ms4HvK06DxI [email protected]

The key's randomart image is:

+---[RSA 4096]----+

| |

| . |

| o.. . . |

| .+.. . . |

| E .o S o . |

| . +..+ . o . |

|. = +..B .o. . |

| o =.&= =oooo |

| .&OB=oo o. |

+----[SHA256]-----+

Ahora copie la clave del chef-servidor desde la estación de trabajo.

[email protected]:~/chef-repo$ sudo ssh-copy-id [email protected]

/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/geekflare/.ssh/id_rsa.pub"

/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys

[email protected]'s password:

Number of key(s) added: 1

Now try logging into the machine, with: "ssh '[email protected]'"

and check to make sure that only the key(s) you wanted were added.

Ahora copiaré los archivos .pem (chefadmin.pem y chef-org.pem) del servidor chef a la estación de trabajo.

[email protected]:~/chef-repo$ scp [email protected]:~/.chef/*.pem ~/chef-repo/.chef/

chefadmin.pem 100% 1674 105.1KB/s 00:00   

chef-org.pem 100% 1674 103.0KB/s 00:00

Compruebe si los archivos .pem se copiaron correctamente en la estación de trabajo.

[email protected]:~/chef-repo$ ls ~/chef-repo/.chef

chefadmin.pem chef-org.pem

Crear control de versiones

Mientras se trabaja en una estación de trabajo, se producen muchos cambios y ediciones en los libros de cocina (unidades de configuración), por lo que se requiere un sistema de control de versiones para realizar un seguimiento de estos cambios. Entonces, sigamos adelante y creemos un sistema de control de versiones usando Git en la estación de trabajo. Crearé un repositorio git dentro del directorio chef-repo. Agregaré un nombre de usuario y correo electrónico para configurar git

[email protected]:~$ git config --global user.name geekflare

[email protected]:~$ git config --global user.email [email protected]

Agreguemos el directorio .chef al archivo .gitignore.

geekfl[email protected]:~$ echo ".chef" > ~/chef-repo/.gitignore

Ahora ejecutaré los comandos add y commit de git desde un directorio chef-repo.

[email protected]:~$ cd ~/chef-repo

[email protected]:~/chef-repo$ git add .

[email protected]:~/chef-repo$ git commit -m "initial commit"

[master (root-commit) 99c8c11] initial commit

 16 files changed, 359 insertions(+)

 create mode 100644 .chef-repo.txt

 create mode 100644 .gitignore

 create mode 100644 LICENSE

 create mode 100644 README.md

 create mode 100644 chefignore

 create mode 100644 cookbooks/README.md

 create mode 100644 cookbooks/example/README.md

 create mode 100644 cookbooks/example/attributes/default.rb

 create mode 100644 cookbooks/example/metadata.rb

 create mode 100644 cookbooks/example/recipes/default.rb

 create mode 100644 data_bags/README.md

 create mode 100644 data_bags/example/example_item.json

 create mode 100644 environments/README.md

 create mode 100644 environments/example.json

 create mode 100644 roles/README.md

 create mode 100644 roles/example.json

Compruebe el estado.

[email protected]:~/chef-repo$ git status

On branch master

nothing to commit, working tree clean

Genere su primer libro de cocina

Ahora la instalación de WorkStation está completa y puede comenzar a crear libros de recetas en WorkStation. Intente generar un libro de recetas de muestra en la estación de trabajo y vea si se genera correctamente.

Ejecutaré el siguiente comando para generar un libro de recetas.

[email protected]:~$ Chef generate cookbook geekflare_cookbook

Generating cookbook geekflare_cookbook

- Ensuring correct cookbook file content

- Committing cookbook files to Git

- Ensuring delivery configuration

- Ensuring correct delivery build cookbook content

- Adding delivery configuration to feature branch

- Adding build cookbook to feature branch

- Merging delivery content feature branch to master

Your cookbook is ready. Type `cd geekflare_cookbook` to enter it.

There are several commands you can run to get started locally developing and testing your cookbook.

Type `delivery local --help` to see a full list.

Why not start by writing a test? Tests for the default recipe are stored at:

test/integration/default/default_test.rb

If you'd prefer to dive right in, the default recipe can be found at:

recipes/default.rb

Genere chef-repo, luego muévase a un directorio chef-repo

[email protected]:~$ Chef generate app chef-repo

WARNING: The command 'chef generator app' is deprecated and will be removed from the next major release of Chef DK / Workstation (April 2019)

Recipe: code_generator::app

 * directory[/home/geekflare/chef-repo] action create (up to date)

 * template[/home/geekflare/chef-repo/.kitchen.yml] action create

   - create new file /home/geekflare/chef-repo/.kitchen.yml

   - update content in file /home/geekflare/chef-repo/.kitchen.yml from none to ceae09

   (diff output suppressed by config)

 * directory[/home/geekflare/chef-repo/test/integration/default] action create

   - create new directory /home/geekflare/chef-repo/test/integration/default

 * template[/home/geekflare/chef-repo/test/integration/default/default_test.rb] action create_if_missing

   - create new file /home/geekflare/chef-repo/test/integration/default/default_test.rb

   - update content in file /home/geekflare/chef-repo/test/integration/default/default_test.rb from none to 0f757b

   (diff output suppressed by config)

 * template[/home/geekflare/chef-repo/README.md] action create

   - update content in file /home/geekflare/chef-repo/README.md from 2b4f46 to 6401b8

   (diff output suppressed by config)

 * directory[/home/geekflare/chef-repo/cookbooks] action create (up to date)

 * directory[/home/geekflare/chef-repo/cookbooks/chef-repo] action create

   - create new directory /home/geekflare/chef-repo/cookbooks/chef-repo

 * template[/home/geekflare/chef-repo/cookbooks/chef-repo/metadata.rb] action create

   - create new file /home/geekflare/chef-repo/cookbooks/chef-repo/metadata.rb

   - update content in file /home/geekflare/chef-repo/cookbooks/chef-repo/metadata.rb from none to e30be3

   (diff output suppressed by config)

 * cookbook_file[/home/geekflare/chef-repo/cookbooks/chef-repo/chefignore] action create

   - create new file /home/geekflare/chef-repo/cookbooks/chef-repo/chefignore

   - update content in file /home/geekflare/chef-repo/cookbooks/chef-repo/chefignore from none to 9e2ffd

   (diff output suppressed by config)

 * cookbook_file[/home/geekflare/chef-repo/cookbooks/chef-repo/Berksfile] action create

   - create new file /home/geekflare/chef-repo/cookbooks/chef-repo/Berksfile

   - update content in file /home/geekflare/chef-repo/cookbooks/chef-repo/Berksfile from none to 15e000

   (diff output suppressed by config)

 * directory[/home/geekflare/chef-repo/cookbooks/chef-repo/recipes] action create

   - create new directory /home/geekflare/chef-repo/cookbooks/chef-repo/recipes

 * template[/home/geekflare/chef-repo/cookbooks/chef-repo/recipes/default.rb] action create

   - create new file /home/geekflare/chef-repo/cookbooks/chef-repo/recipes/default.rb

   - update content in file /home/geekflare/chef-repo/cookbooks/chef-repo/recipes/default.rb from none to f56ecb

   (diff output suppressed by config)

 * directory[/home/geekflare/chef-repo/cookbooks/chef-repo/spec/unit/recipes] action create

   - create new directory /home/geekflare/chef-repo/cookbooks/chef-repo/spec/unit/recipes

 * cookbook_file[/home/geekflare/chef-repo/cookbooks/chef-repo/spec/spec_helper.rb] action create_if_missing

   - create new file /home/geekflare/chef-repo/cookbooks/chef-repo/spec/spec_helper.rb

   - update content in file /home/geekflare/chef-repo/cookbooks/chef-repo/spec/spec_helper.rb from none to 1f80e1

   (diff output suppressed by config)

 * template[/home/geekflare/chef-repo/cookbooks/chef-repo/spec/unit/recipes/default_spec.rb] action create_if_missing

   - create new file /home/geekflare/chef-repo/cookbooks/chef-repo/spec/unit/recipes/default_spec.rb

   - update content in file /home/geekflare/chef-repo/cookbooks/chef-repo/spec/unit/recipes/default_spec.rb from none to 666a01

   (diff output suppressed by config)

 * execute[initialize-git] action run

   - execute git init .

 * cookbook_file[/home/geekflare/chef-repo/.gitignore] action create

   - update content in file /home/geekflare/chef-repo/.gitignore from 25558e to edcd62

   (diff output suppressed by config)

Configurar cuchillo

Knife es una herramienta de línea de comandos para administrar nodos, libros de cocina y recetas. Para configurar Knife, cree un archivo config.rb y coloque el contenido a continuación en el archivo, estas son configuraciones de cuchillo.

geek[email protected]:~$ sudo gedit ~/chef-repo/.chef/config.rb
current_dir = File.dirname(__FILE__)

log_level :info

log_location STDOUT

node_name 'chefadmin'

client_key "chefadmin.pem"

validation_client_name 'chef-org-validator'

validation_key "chef-org-validator.pem"

chef_server_url 'https://chef-geekflare/organizations/chef-org'

cache_type 'BasicFile'

cache_options( :path => "#/.chef/checksums" )

cookbook_path ["#/../cookbooks"]

Ahora vaya a un directorio chef-repo y copie los certificados SSL.

[email protected]:~$ cd chef-repo

[email protected]:~/chef-repo$ knife ssl fetch

WARNING: Certificates from chef-geekflare will be fetched and placed in your trusted_cert

directory (/home/geekflare/chef-repo/.chef/trusted_certs).

Knife has no means to verify these are the correct certificates. You should

verify the authenticity of these certificates after downloading.

Adding certificate for chef-geekflare in /home/geekflare/chef-repo/.chef/trusted_certs/chef-geekflare.crt

Para verificar que config.rb esté configurado correctamente, ejecute el siguiente comando.

[email protected]:~/chef-repo$ knife client list

chef-org-validator

Bootstrap un nodo

Bootstrap se ejecuta desde la máquina de la estación de trabajo e instala el chef-cliente en los nodos. Luego, los nodos pueden leer las configuraciones del servidor chef utilizando el usuario y la contraseña del nodo cliente para arrancar un nodo.

Ahora arrancaré un nodo con la dirección IP 192.168.0.109, el nombre de usuario geekflare y la contraseña geekflare.org.

[email protected]:~/chef-repo/.chef$ knife bootstrap 192.168.0.109 -x geekflare -P geekflare.org --node-name geekflare-client-1

Creating new client for geekflare-client-1

Creating new node for geekflare-client-1

Connecting to 192.168.0.109

192.168.0.109 -----> Installing Chef Omnibus (-v 14)

192.168.0.109 downloading https://omnitruck-direct.chef.io/chef/install.sh

192.168.0.109 to file /tmp/install.sh.9250/install.sh

192.168.0.109 trying wget...

192.168.0.109 ubuntu 18.10 x86_64

192.168.0.109 Getting information for chef stable 14 for ubuntu...

192.168.0.109 downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=14&p=ubuntu&pv=18.10&m=x86_64

192.168.0.109 to file /tmp/install.sh.9261/metadata.txt

192.168.0.109 trying wget...

192.168.0.109 sha1 534bae390bde3bd9d93bef99335f62246624f32b

192.168.0.109 sha256 94bc60b3a97ddadf77a70c7678ec77a676942c74f8152a2c70a0f5b68e22a42e

192.168.0.109 url https://packages.chef.io/files/stable/chef/14.14.25/ubuntu/18.04/chef_14.14.25-1_amd64.deb

192.168.0.109 version 14.14.25

192.168.0.109 downloaded metadata file looks valid...

192.168.0.109 downloading https://packages.chef.io/files/stable/chef/14.14.25/ubuntu/18.04/chef_14.14.25-1_amd64.deb

192.168.0.109 to file /tmp/install.sh.9261/chef_14.14.25-1_amd64.deb

192.168.0.109 trying wget...

192.168.0.109 Comparing checksum with sha256sum...

192.168.0.109 Installing chef 14

192.168.0.109 installing with dpkg...

192.168.0.109 Selecting previously unselected package chef.

(Reading database ... 204803 files and directories currently installed.)

192.168.0.109 Preparing to unpack .../chef_14.14.25-1_amd64.deb ...

192.168.0.109 Unpacking chef (14.14.25-1) ...

192.168.0.109 Setting up chef (14.14.25-1) ...

192.168.0.109 Thank you for installing Chef Infra Client! For help getting started visit https://learn.chef.io

192.168.0.109 Starting the first Chef Client run...

192.168.0.109 Starting Chef Client, version 14.14.25

192.168.0.109 resolving cookbooks for run list: []

192.168.0.109 Synchronizing Cookbooks:

192.168.0.109 Installing Cookbook Gems:

192.168.0.109 Compiling Cookbooks...

192.168.0.109 [2019-10-23T10:52:57-04:00] WARN: Node geekflare-client-1 has an empty run list.

192.168.0.109 Converging 0 resources

192.168.0.109

192.168.0.109 Running handlers:

192.168.0.109 Running handlers complete

192.168.0.109 Chef Client finished, 0/0 resources updated in 07 seconds

Ahora enumeraré todos los nodos que se arrancaron

[email protected]:~/chef-repo/.chef$ knife node list

geekflare-client-1

Ejecute el siguiente comando para obtener los detalles del nodo.

[email protected]:~/chef-repo/.chef$ knife node show geekflare-client-1

Node Name: geekflare-client-1

Environment: _default

FQDN: client-node

IP: 192.168.0.109

Run List:   

Roles:      

Recipes:    

Platform: ubuntu 18.10

Tags:

¡Ahora la configuración está lista!

Hemos instalado con éxito un servidor chef, una estación de trabajo y un nodo en Ubuntu. Puede continuar y comenzar a crear recetas y libros de cocina en Chef para la gestión de la configuración de la infraestructura.

Si eres un principiante absoluto, entonces te puede gustar tomar este Curso de Udemy también.

Deja un comentario