<commit_before>.. _Configuring-Cobbler:

Configuring Cobbler
-------------------

Fuel uses a single file, ``config.yaml``, to both configure Cobbler and assist in the configuration of the ``site.pp`` file.  This file appears in the ``/root`` directory when the master node (fuel-pm) is provisioned and configured.

You'll want to configure this example for your own situation, but the example looks like this::

  common:
    orchestrator_common:
      attributes:
        deployment_mode: ha_compute
        deployment_engine: simplepuppet
      task_uuid: deployment_task

Possible values for ``deployment_mode`` are ``singlenode_compute``, ``multinode_compute``, and ``ha_compute``.  Change the ``deployment_mode`` to ``ha_compute`` to tell Fuel to use HA architecture.  The ``simplepuppet`` ``deployment_engine`` means that the orchestrator will be calling Puppet on each of the nodes.

Next you'll need to set OpenStack's networking information::

    openstack_common:
     internal_virtual_ip: 10.20.0.10
     public_virtual_ip: 192.168.0.10
     create_networks: true
     fixed_range: 172.16.0.0/16
     floating_range: 192.168.0.0/24

Change the virtual IPs to match the target networks, and set the fixed and floating ranges. ::

     swift_loopback: loopback
     nv_physical_volumes:
      - /dev/sdb

By setting the ``nv_physical_volumes`` value, you are not only telling OpenStack to use this value for Cinder (you'll see more about that in the ``site.pp`` file), you're also telling Fuel to create and mount the appropriate partition.

Later, we'll set up a new partition for Cinder, so tell Cobbler to create it here. ::

   external_ip_info:
     public_net_router: 192.168.0.1
     ext_bridge: 0.0.0.0
     pool_start: 192.168.0.110
     pool_end: 192.168.0.126

Set the ``public_net_router`` to be the master node.  The ``ext_bridge`` is a legacy value, included for compatability reasons, so you can set it to the same value as the ``public_net_router``, or simply to ``0.0.0.0``.  The ``pool_start`` and ``pool_end`` values represent the public addresses of your nodes, and should be within the ``floating_range``. ::

   segment_range: 900:999
   use_syslog: false
   syslog_server: 127.0.0.1
   mirror_type: default

**THIS SETTING IS CRUCIAL:** The ``mirror_type`` **must** to be set to ``default`` unless you have your own repositories set up, or OpenStack will not install properly. ::

   quantum: true
   internal_interface: eth0
   public_interface: eth1
   private_interface: eth2
   public_netmask: 255.255.255.0
   internal_netmask: 255.255.255.0

Earlier, you decided which interfaces to use for which networks; note that here. ::

   default_gateway: 192.168.0.1

Depending on how you've set up your network, you can either set the ``default_gateway`` to the master node (fuel-pm) or to the ``public_net_router``. ::

   nagios_master: fuel-controller-01.your-domain-name.com
   loopback: loopback
   cinder: true
   cinder_on_computes: true
   swift: true

In this example, you're using Cinder and including it on the compute nodes, so note that appropriately.  Also, you're using Swift, so turn that on here. ::

   repo_proxy: http://10.20.0.100:3128

One improvemenet in Fuel 2.1 is that ability for the master node to cache downloads in order to speed up installs; by default the ``repo_proxy`` is set to point to fuel-pm in order to let that happen. ::

   deployment_id: '53'

Fuel enables you to manage multiple clusters; setting the ``deployment_id`` will let Fuel know which deployment you're working with. ::

   dns_nameservers:
   - 10.20.0.100
   - 8.8.8.8

The slave nodes should first look to the master node for DNS, so mark that as your first nameserver.

The next step is to define the nodes themselves.  To do that, you'll list each node once for each role that needs to be installed. ::

   nodes:
   - name: fuel-pm
     role: cobbler
     internal_address: 10.20.0.100
     public_address: 192.168.0.100
   - name: fuel-controller-01
     role: controller
     internal_address: 10.20.0.101
     public_address: 192.168.0.101
     swift_zone: 1
   - name: fuel-controller-02
     role: controller
     internal_address: 10.20.0.102
     public_address: 192.168.0.102
     swift_zone: 2
   - name: fuel-controller-03
     role: controller
     internal_address: 10.20.0.103
     public_address: 192.168.0.103
     swift_zone: 3
   - name: fuel-controller-01
     role: quantum
     internal_address: 10.20.0.101
     public_address: 192.168.0.101
   - name: fuel-compute-01
     role: compute
     internal_address: 10.20.0.110
     public_address: 192.168.0.110

Notice that each node is listed multiple times; this is because each node fulfills multiple roles. 

The ``cobbler_common`` section applies to all machines::

  cobbler_common:
    # for Centos
    profile: "centos63_x86_64"
    # for Ubuntu
    # profile: "ubuntu_1204_x86_64"

Fuel can install CentOS or Ubuntu on your servers, or you can add a profile of your own. By default, ``config.yaml`` uses Ubuntu, but for our example we'll use CentOS. ::

    netboot-enabled: "1"
    # for Ubuntu
    # ksmeta: "puppet_version=2.7.19-1puppetlabs2 \
    # for Centos
    name-servers: "10.20.0.100"
    name-servers-search: "your-domain-name.com"
    gateway: 10.20.0.100

Set the default nameserver to be fuel-pm, and change the domain name to your own domain name.  The master node will also serve as a default gateway for the nodes. ::

    ksmeta: "puppet_version=2.7.19-1puppetlabs2 \
      puppet_auto_setup=1 \
      puppet_master=fuel-pm.your-domain-name.com \

Change the fully-qualified domain name for the Puppet Master to reflect your own domain name. ::

      puppet_enable=0 \
      ntp_enable=1 \
      mco_auto_setup=1 \
      mco_pskey=un0aez2ei9eiGaequaey4loocohjuch4Ievu3shaeweeg5Uthi \
      mco_stomphost=10.20.0.100 \

Make sure the ``mco_stomphost`` is set for the master node so that the orchestrator can find the nodes. ::

      mco_stompport=61613 \
      mco_stompuser=mcollective \
      mco_stomppassword=<PASSWORD>exo \
      mco_enable=1"
<commit_msg>Corrected descriptions of parameters based on feedback from Alex.<commit_after>.. _Configuring-Cobbler:

Configuring Cobbler
-------------------

Fuel uses a single file, ``config.yaml``, to both configure Cobbler and assist in the configuration of the ``site.pp`` file.  This file appears in the ``/root`` directory when the master node (fuel-pm) is provisioned and configured.

You'll want to configure this example for your own situation, but the example looks like this::

  common:
    orchestrator_common:
      attributes:
        deployment_mode: ha_compute
        deployment_engine: simplepuppet
      task_uuid: deployment_task

Possible values for ``deployment_mode`` are ``singlenode_compute``, ``multinode_compute``, ``ha_compute``, ``ha_compact``, ``ha_full``, and ``ha_minimal``.  Change the ``deployment_mode`` to ``ha_compute`` to tell Fuel to use HA architecture.  The ``simplepuppet`` ``deployment_engine`` means that the orchestrator will be calling Puppet on each of the nodes.

Next you'll need to set OpenStack's networking information::

    openstack_common:
     internal_virtual_ip: 10.20.0.10
     public_virtual_ip: 192.168.0.10
     create_networks: true
     fixed_range: 172.16.0.0/16
     floating_range: 192.168.0.0/24

Change the virtual IPs to match the target networks, and set the fixed and floating ranges. ::

     swift_loopback: loopback
     nv_physical_volumes:
      - /dev/sdb

By setting the ``nv_physical_volumes`` value, you are not only telling OpenStack to use this value for Cinder (you'll see more about that in the ``site.pp`` file), you're also telling Fuel where Cinder should be storing data.

Later, we'll set up a new partition for Cinder, so tell Cobbler to create it here. ::

   external_ip_info:
     public_net_router: 192.168.0.1
     ext_bridge: 0.0.0.0
     pool_start: 192.168.0.110
     pool_end: 192.168.0.126

Set the ``public_net_router`` to point to the real router at the public network.  The ``ext_bridge`` is the ip of the Quantum bridge. It should assigned to any available free IP on the public network that's outside the floating range.  You also have the option to simply set it to ``0.0.0.0``.  The ``pool_start`` and ``pool_end`` values represent the public addresses of your nodes, and should be within the ``floating_range``. ::

   segment_range: 900:999
   use_syslog: false
   syslog_server: 127.0.0.1
   mirror_type: default

**THIS SETTING IS CRUCIAL:** The ``mirror_type`` **must** to be set to ``default`` unless you have your own repositories set up, or OpenStack will not install properly. ::

   quantum: true
   internal_interface: eth0
   public_interface: eth1
   private_interface: eth2
   public_netmask: 255.255.255.0
   internal_netmask: 255.255.255.0

Earlier, you decided which interfaces to use for which networks; note that here. ::

   default_gateway: 192.168.0.1

Depending on how you've set up your network, you can either set the ``default_gateway`` to the master node (fuel-pm) or to the ``public_net_router``. ::

   nagios_master: fuel-controller-01.your-domain-name.com
   loopback: loopback
   cinder: true
   cinder_on_computes: true
   swift: true

The loopback setting determines how Swift stores data. If you set the value to ``loopback``, Swift will use 1gb files as storage devices. If you tuned Cobbler to create a partition for Swift and mounted it to ``/srv/nodes/``, then you should set ``loopback`` to ``false``.   
   
In this example, you're using Cinder and including it on the compute nodes, so note that appropriately.  Also, you're using Swift, so turn that on here. ::

   repo_proxy: http://10.20.0.100:3128

One improvement in Fuel 2.1 was the ability for the master node to cache downloads in order to speed up installs; by default the ``repo_proxy`` is set to point to fuel-pm in order to let that happen. ::

   deployment_id: '53'

Fuel enables you to manage multiple clusters; setting the ``deployment_id`` will let Fuel know which deployment you're working with. ::

   dns_nameservers:
   - 10.20.0.100
   - 8.8.8.8

The slave nodes should first look to the master node for DNS, so mark that as your first nameserver.

The next step is to define the nodes themselves.  To do that, you'll list each node once for each role that needs to be installed. ::

   nodes:
   - name: fuel-pm
     role: cobbler
     internal_address: 10.20.0.100
     public_address: 192.168.0.100
   - name: fuel-controller-01
     role: controller
     internal_address: 10.20.0.101
     public_address: 192.168.0.101
     swift_zone: 1
   - name: fuel-controller-02
     role: controller
     internal_address: 10.20.0.102
     public_address: 192.168.0.102
     swift_zone: 2
   - name: fuel-controller-03
     role: controller
     internal_address: 10.20.0.103
     public_address: 192.168.0.103
     swift_zone: 3
   - name: fuel-controller-01
     role: quantum
     internal_address: 10.20.0.101
     public_address: 192.168.0.101
   - name: fuel-compute-01
     role: compute
     internal_address: 10.20.0.110
     public_address: 192.168.0.110

Notice that each node is listed multiple times; this is because each node fulfills multiple roles. 

The ``cobbler_common`` section applies to all machines::

  cobbler_common:
    # for Centos
    profile: "centos63_x86_64"
    # for Ubuntu
    # profile: "ubuntu_1204_x86_64"

Fuel can install CentOS or Ubuntu on your servers, or you can add a profile of your own. By default, ``config.yaml`` uses Ubuntu, but for our example we'll use CentOS. ::

    netboot-enabled: "1"
    # for Ubuntu
    # ksmeta: "puppet_version=2.7.19-1puppetlabs2 \
    # for Centos
    name-servers: "10.20.0.100"
    name-servers-search: "your-domain-name.com"
    gateway: 10.20.0.100

Set the default nameserver to be fuel-pm, and change the domain name to your own domain name.  Set the ``gateway`` to the public network's default gateway. Alternatively, if you don't plan to use your public networks actual gateway, you can set this value to be the IP address of the master node. **Please note:** You must specify a working gateway (or proxy) in order to install OpenStack, because the system will need to communicate with public repositories. ::

    ksmeta: "puppet_version=2.7.19-1puppetlabs2 \
      puppet_auto_setup=1 \
      puppet_master=fuel-pm.your-domain-name.com \

Change the fully-qualified domain name for the Puppet Master to reflect your own domain name. ::

      puppet_enable=0 \
      ntp_enable=1 \
      mco_auto_setup=1 \
      mco_pskey=un0aez2ei9eiGaequaey4loocohjuch4Ievu3shaeweeg5Uthi \
      mco_stomphost=10.20.0.100 \

Make sure the ``mco_stomphost`` is set for the master node so that the orchestrator can find the nodes. ::

      mco_stompport=61613 \
      mco_stompuser=mcollective \
      mco_stomppassword=<PASSWORD> \
      mco_enable=1"

{'fraction_non_alphanumeric': 0.08796475226095694, 'fraction_numerical': 0.05155754811780165, 'mean_word_length': 3.39768864717879, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 62, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1889927', 'n_tokens_mistral': 4532, 'n_tokens_neox': 4015, 'n_words': 1494}