> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ocient.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Node Bootstrapping Reference

export const Ocient = "Ocient®";

### Bootstrap a Node

<Steps>
  <Step title="Connect to the Node">
    To bootstrap an {Ocient} node, connect to the node with your server username and password and the IP address of your node.

    For example, connect as administrator `admin` to the IP Address `10.10.10.10`.

    ```shell Shell theme={null}
    ssh admin@10.10.10.10
    ```
  </Step>

  <Step title="Configure the Bootstrap Configuration File">
    Use your preferred text editor with `sudo` to create the `/var/opt/ocient/bootstrap.conf` file as root.

    For a list of bootstrapping options, see [Supported Options](#supported-options).

    **Option 1: Bootstrap the initial node in a system**

    Use these `bootstrap.conf` settings to create the initial node in a system.

    `/var/opt/ocient/bootstrap.conf` **example**

    ```yaml YAML theme={null}
    initialSystem: true
    ```

    **Option 2: Bootstrap a new node on a system with an initial node**

    Use these `bootstrap.conf` settings to create another node in a system, replacing the IP Address `10.10.10.10` with the IP address or hostname of the initial node.

    `/var/opt/ocient/bootstrap.conf` **example**

    ```yaml YAML theme={null}
    adminHost: 10.10.10.10
    ```
  </Step>

  <Step title="Start the Node">
    Start the database.

    ```shell Shell theme={null}
    sudo systemctl start rolehostd
    ```

    Verify that the node and the service are active by running this status command.

    ```shell Shell theme={null}
    systemctl status rolehostd

    rolehostd.service - Rolehostd daemon startup
         Loaded: loaded (/etc/systemd/system/rolehostd.service; enabled; vendor preset: enabled)
         Active: active (running) since Wed 2022-01-26 23:31:36 UTC; 7s ago
         ...
    ```

    You have bootstrapped the node.
  </Step>
</Steps>

### Supported Options

You can edit the `/var/opt/ocient/bootstrap.conf` file to include a number of other options for advanced system configurations.

The Ocient `bootstrap.conf` file can also include these optional parameters. For examples of these options, see the [Example bootstrap.conf file](#example-bootstrap-conf-file).

| **Option**           | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`               | The default name of the node in the database is the hostname. If that name is not appropriate, you can assign a different name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `nodeAddress`        | The default address of this node is the hostname of the node, or the IP address if the `useDns` setting is `false`. If the system has multiple interfaces or you want an alternative setup, then you can specify the node address. This address is the address that all the other nodes in the cluster use to contact this node.                                                                                                                                                                                                                                                                                                                                                                                                   |
| `externalAddress`    | It might be desirable to have the SQL Nodes listen on a different external address than the system uses internally. The `externalAddress` parameter can either be a single address or a list of addresses.  <br />Example of single address:  <br />`externalAddress: 10.10.10.1`  <br />Example of a list of addresses:  <br />`externalAddress: ["10.10.10.1","20.20.20.2"]`  <br />ℹ️This option applies to REST endpoints only. For REST endpoints, see [System Information REST Endpoints](/system-information-rest-endpoints).                                                                                                                                                                                               |
| `adminUserName`      | The default user, specified as `admin@system`, when you create an Ocient System. If a different administrator user should be used to add this node to an existing system, use this option to indicate the user.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `adminPassword`      | If the administrator password is not the default, then use this option to specify the password.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `logLevel`           | The logging level for the system. Defaults to DEBUG.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `connectivityPools`  | The configuration of SQL Nodes in a connectivity pool. You can use this configuration to configure the connectivity pool for the first SQL Node in a cluster. Other nodes cannot use this option.  <br />If there are no entries in the `bootstrap.conf` file, then the Ocient System adds the SQL Node to a new connectivity pool with a default name.  <br />Example of the connectivity pool named `test_pool` configuration:<br /><br /><br />connectivityPools:<br />  test\_pool:<br />    sourceAddress: 1.2.3.4/12<br />    sourcePort: 1 # optional<br />    priority: 1<br />    listenAddress: 111.1.1.1<br />    listenPort: 4050<br />    advertisedAddress: localhost<br />    advertisedPort: 4050 # optional<br /> |
| `systemStorageSpace` | The configuration for storage space has width and parity width for the Ocient System. If you do not configure the storage space, the system sets the width to 3 and parity to 2, the default values. For details about width and parity width, see [Core Elements of an Ocient System](/core-elements-of-an-ocient-system). To set these options using SQL syntax, see [CREATE STORAGESPACE](/cluster-and-node-management#create-storagespace).                                                                                                                                                                                                                                                                                    |
| `useOpal`            | When you set this value to `false`, this option prevents the `rolehostd` service from taking ownership of and enabling Opal locking on all NVMe drives that support it. Bootstrap with this setting using an external Key Management System (KMS).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `pageReplication`    | The number of page replicas the system writes before a page is available, unless you enable degraded writes. The fault tolerance is `(pageReplication - 1)`. The calculation for the default value is `min(width, parityWidth+1)`. For the system storage space, the default value is 3.                                                                                                                                                                                                                                                                                                                                                                                                                                           |

***

#### Example bootstrap.conf File \[#example-bootstrap-conf-file]

This example shows a `bootstrap.conf` file that you can use as a template.

```yaml YAML theme={null}
## initialSystem: true           # Uncomment for the first node in a
                                # multi-cluster system.
                                # Defaults to false. Cannot be
                                # true if initialSingleClusterSystem
                                # is also true.

## initialSingleClusterSystem: true  # Uncomment for the first node in a
                                # single-cluster system.
                                # Defaults to false. Cannot be
                                # true if initialSystem is also true.

## systemName: productionSystem  # The name of the Ocient System. This
                                # configuration applies only when the
                                # initialSystem or initialSingleClusterSystem
                                # configuration is set to true.

## adminHost: sql.example.com    # Hostname or IP address of an administrator
                                # node, generally the first node. Not
                                # required for the initial node, but required
                                # for all other nodes.

## name: elmo                    # The name of this node.
                                # Defaults to hostname.

## nodeAddress: sql1.example.com # The Hostname or IP address of this node.
                                # Defaults to hostname, and if that does not
                                # work, the bootstrapping process uses the IP
                                # address of the system.

## externalAddress: ["10.10.10.1", "20.20.20.2"]

## useDns: false                 # Use DNS to determine the hostname of this
                                # node. Defaults to true. When you set this
                                # configuration to false, the bootstrapping
                                # process uses the IP address of the system.

## adminUserName: bert@system    # A system administrator username.
                                # Defaults to "admin@system".
## adminPassword: ernie          # The password for the administrator user.
                                # Defaults to "admin".

## logLevel: info                # Log level for the system.
                                # Defaults to debug.

## connectivityPools:            # Define connectivity pool named test_pool.
##    test_pool:
##      sourceAddress: 1.2.3.4/12 # The source IP address, which is
                                 # the IP address in CIDR notation of
                                 # the client that connects to the SQL Node.

## 	   sourcePort: 1             # The optional source port number, which is the
                                 # port number of the client. This parameter
                                 # defaults to none, which means any port number.
#	   priority: 1               # The priority of the connection. A higher number
                                 # indicates a higher priority.
#	   listenAddress: 111.1.1.1  # The IP address for listening.
#	   listenPort: 4050             # The port number for listening.
#	   advertisedAddress: localhost # The IP address to return to the client.
#	   advertisedPort: 4050      # The optional port number to return to the client.
                                 # If you specify NULL for this parameter, then the
                                 # database uses the value of the listen_port parameter.

## systemStorageSpace:            # Define the system storage space.
##    width: 3                    # The width is the total number of segments to use in
                                 # each segment group.
##    parityWidth: 2              # The parity width is the number of parity coding bits
                                 # to use for each segment group, or the fault tolerance.
##    pageReplication: min(width, parityWidth+1)   # Override default page replication.
```

### Related Links

[Checking System Configuration Before Bootstrapping](/checking-system-configuration-before-bootstrapping)

[Operating System Configuration](/operating-system-configuration)

[Cluster and Node Management](/cluster-and-node-management)
