# Moderator Installation Guide

> Moderator node included Control & Storage (Optional). It's a Moderation for the cluster.

## Moderator node overview {#moderator-node-overview}

Moderator node included Control & Storage (Optional). It's a Moderation for the cluster.

## Hardware recommendation {#hardware-recommendation}

For detailed hardware requitements and recommendation, reference the [Hardware Requirement](../../installation/hardware-requirements)

### Dependency {#dependency}

- edge-core node

## Installation {#installation}

### Choose a setup options - Wizard {#choose-a-setup-options---wizard}

```bash
    First Time Setup Options:
    1: Wizard
    2: Advanced
    Enter index: 1
```

### EULA {#eula}

```bash
    -- Welcome --
    Welcome to the Cube Appliance setup wizard.
    Using this setup wizard, you can:
    * View and accept the Software License Agreement
    * Set the appliance password
    * View and configure networking

    Press Enter to continue.

    -- Software License Agreement --
    Currently selected language: English
    1: Select language for license display
    2: Read Bigstack terms
    3: Read non-Bigstack terms
    4: Proceed to acceptance

    Select option: 4

    By choosing 'I agree,' you agree that (1) you have had the opportunity to
    review the terms of licenses presented above and (2) such terms govern this
    transaction. If you do not agree, choose 'I do not agree'.
    1: I agree
    2: I do not agree

    Select option: 1
```

### Change the password {#change-the-password}

The default password `admin` is automatically updated after the cluster completes the `set_ready` operation.

The new password follows the pattern: `Cube@xxx.xxx`, where `xxx.xxx` corresponds to the last two octets of the cluster’s VIP IPv4 address.

:::note

If the cluster VIP is `192.168.100.100`, the updated default password will be:
`Cube@100.100`.

:::

```bash
    -- Appliance Password --
    Password changes are applied immediately.
    Password has not been modified.
    1: Change password
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: 1

    - Change Password -
    Enter old password: admin
    Enter new password:
    Confirm new password:
    Password successfully changed.
```

### Configure hostname {#configure-hostname}

:::warning

A valid hostname must be in lowercase and cannot contain special characters (!@#$%^&\*()), underscores (\_), or spaces.

:::

A valid hostname must:

- Contain only lowercase letters (a-z), numbers (0-9), and hyphens (-)
- Be 64 characters or less in length
- Be unique within the network
- Must start with a letter
- Not be entirely numeric

```bash
    -- Host Name Configuration --
    Host name: unconfigured
    1: Change the host name
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: 1

    - Change the Host Name -
    Enter the new host name: moderator

    -- Host Name Configuration --
    Host name: moderator
    1: Change the host name
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: n
```

### [Optional] Configure network bonding {#optional-configure-network-bonding}

#### if cable is connected, column [Speed] will present the status else N/A, WARNING: do not use `bond0`, `bond1`, `bondx` as bonding name {#if-cable-is-connected-column-speed-will-present-the-status-else-na-warning-do-not-use-bond0-bond1-bondx-as-bonding-name}

```bash
    -- Network Bonding Settings --
    ---------------------------------------------------
    Label   BusID/Slaves     Driver  State    Speed
    ---------------------------------------------------
        IF.1   0000:04:00.0      r8169     UP    1000F
    ---------------------------------------------------
    1: Display policy
    2: Configure network bonding
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: n
```

### [Optional] Configure VLAN {#optional-configure-vlan}

```bash
    -- VLAN Settings --
    ---------------------------------------------------
    Label   BusID/Slaves     Driver  State    Speed
    ---------------------------------------------------
        IF.1   0000:04:00.0      r8169     UP    1000F
    ---------------------------------------------------
    1: Display policy
    2: Configure vlan network
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: n
```

### Configure IP address {#configure-ip-address}

```bash
    -- Networking Settings --
    ---------------------------------------------------
    Label   BusID/Slaves     Driver  State    Speed
    ---------------------------------------------------
        IF.1   0000:04:00.0      r8169     UP    1000F
    ---------------------------------------------------
    1: Display device status
    2: Display policy
    3: Configure IF.1
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: 3

    - Configure IF.1 -
    Enter the IPv4 address: 10.32.2.230
    Enter the IPv4 subnet mask: 255.255.0.0
    Enter the IPv4 default gateway: 10.32.0.254

    -- Networking Settings --
    ---------------------------------------------------
    Label   BusID/Slaves     Driver  State    Speed
    ---------------------------------------------------
        IF.1   0000:04:00.0      r8169     UP    1000F
    ---------------------------------------------------
    1: Display device status
    2: Display policy
    3: Configure IF.1
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: n
```

### DNS setting {#dns-setting}

```bash
    -- DNS Configuration --
    No DNS servers configured.
    1: Set DNS server 1
    2: Set DNS server 2
    3: Set DNS server 3
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: 1

    - Set DNS Server 1 -
    Enter the DNS server IP address: 1.1.1.1
```

### Timezone configuration {#timezone-configuration}

**_[IMPORTANT]_** all nodes must be on the same zone and make sure all the clock/time are sync'ed

```bash
    -- Time Configuration --
    Time configuration changes are applied immediately.
    Time Zone: America/New_York
    Date: 01/02/2023
    Time: 14:00:37
    1: Change the time zone
    2: Change the date
    3: Change the time
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: 1

    - Change the Time Zone -
    Select a continent or ocean:
    1: Africa
    2: Americas
    3: Asia
    4: Atlantic Ocean
    5: Australia
    6: Europe
    7: Pacific Ocean
    8: Etc
    Enter index: 3

    Select a timezone:
    1: (UTC+02:00) Asia/Jerusalem
    2: (UTC+03:00) Asia/Kuwait
    3: (UTC+03:00) Asia/Riyadh
    ~~~~~~
    30: (UTC+08:00) Asia/Taipei
    ~~~~~~
    39: (UTC+12:00) Asia/Kamchatka
    Enter index: 30
```

### Configure Role {#configure-role}

```bash
    -- Cube Role --
    Current role: undef
    Current Management: IF.1
    Current Domain/Region: default/RegionOne
    Current Cube Secret Seed: N/A
    1: Change role
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: 1

    - Change Role -
    Select a role:
    1: control
    2: compute
    3: storage
    4: control-converged
    5: edge-core
    6: moderator
    Enter index: 6
    Specify external IP/domain [optional]:
    Specify management interface: IF.1
    Specify storage interface [frontend(,backend)]: IF.1
    Specify region ("RegionOne"):
    Specify cluster secret seed: dell14
    Specify management CIDR ("10.254.0.0/16"):
```

### Configure High Availability {#configure-high-availability}

```bash
    -- Cube High Availability --
    Current HA setting: disabled
    1: Change HA
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: 1

    - Change HA -
    High Available Cube:
    1: Yes
    2: No
    Enter index: 1
    Specify control group hostname [HOST,HOST,...]: cc1,cc2,cc3
    Specify control group address [IP,IP,...]: 10.32.2.241,10.32.2.242,10.32.2.243

    -- Cube High Availability --
    Current HA setting: enabled
    Current Control Group:
    cc1(10.32.2.241),cc2(10.32.2.242),cc3(10.32.2.243)
    1: Change HA
    x: Exit
    p: Previous screen
    n: Next screen

    Select option: n
```

### Finalize, change the configuration summary before proceed {#finalize-change-the-configuration-summary-before-proceed}

```bash
    Summary
    Password has not been modified.
    Host name: moderator
    IF.1
        Default interface.
        IPv4 Mode: Manual
        IPv4 Address: 10.32.2.230
        IPv4 Netmask: 255.255.0.0
        IPv4 Gateway: 10.32.0.254
        IPv6 Mode: Automatic
    DNS server 1: 1.1.1.1
    Time Zone: Asia/Taipei
    Date: 01/02/2023
    Time: 13:54:19
    Role: moderator
    External IP/Domain: N/A
    Management: IF.1
    Provider: IF.1
    Overlay: IF.1
    Storage: IF.1
    Domain/Region: default/RegionOne
    Cube Secret Seed: bigstack
    Management CIDR: 10.254.0.0/16
    High Availability: disabled
    1: Accept the configuration
    2: Cancel the configuration
    3: Modify the configuration

    Select option: 1
```

:::warning

Do not proceed with additional control nodes until the first control node has completed applying the policy.

Initializing other nodes before the master node completes its setup can result in service registration failures, configuration conflicts, or an unstable cluster state.

:::

### Error message {#error-message}

```bash
    Policy changes could not be applied. System must be rebooted.
    Press enter to continue:
```

#### Please Re-image the node, if the error message above is presented and start over the installation progress {#please-re-image-the-node-if-the-error-message-above-is-presented-and-start-over-the-installation-progress}

### After all nodes installation are completed {#after-all-nodes-installation-are-completed}

Instruct the cluster to initialise the system accordingly by running the CLI : `cluster set_ready`.
Reminder this action only required to run once on one of the control roles (control,control-converged,edge-core,moderator)

```bash
# ssh admin@<your-cluster-vip>
Welcome to the Cube Appliance
Enter "help" for a list of available commands
controller>cluster set_ready
Create a shared external network?
Enter 'YES' to confirm: YES
Input public network in CIDR: 10.32.0.0/16
Input gateway of public network: 10.32.0.254
Enter public network available IP list [IP,IP-IP]: 10.32.150.1-10.32.150.250
[1/6] Updating storage replication rule
[2/6] Checking SDN services
[3/6] Configuring modules
(1/4) processing: cube_last
(2/4) processing: influxdb
(3/4) processing: kibana
(4/4) processing: kafka
[4/6] Starting cluster
[5/6] Strengthening password
[6/6] Cluster check and repair
          Service  Status  Report
      ClusterLink      ok  [ link(v) clock(v) dns(v) ]
       ClusterSys      ok  [ bootstrap(v) license(v) ]
  ClusterSettings      ok  [ etcd(v) ]
        HaCluster      ok  [ hacluster(v) ]
         MsgQueue      ok  [ rabbitmq(v) ]
           IaasDb      ok  [ mysql(v) ]
        VirtualIp      ok  [ vip(v) haproxy_ha(v) ]
          Storage      ok  [ ceph(v) ceph_mon(v) ceph_mgr(v) ceph_mds(v) ceph_osd(v) ceph_rgw(v) rbd_target(v) ]
       ApiService      ok  [ haproxy(v) httpd(v) lmi(v) memcache(v) ]
     SingleSignOn      ok  [ k3s(v) keycloak(v) ]
          Network      ok  [ neutron(v) ]
          Compute      ok  [ nova(v) ]
            Image      ok  [ glance(v) ]
        BlockStor      ok  [ cinder(v) ]
         FileStor      ok  [ manila(v) ]
       ObjectStor      ok  [ swift(v) ]
    Orchestration      ok  [ heat(v) ]
            LBaaS  FIXING  [ octavia(5) ]
                       ok  [ octavia(f1) ]
       InstanceHa      ok  [ masakari(v) ]
         DataPipe      ok  [ zookeeper(v) kafka(v) ]
          Metrics      ok  [ monasca(v) telegraf(v) grafana(v) ]
     LogAnalytics      ok  [ filebeat(v) auditbeat(v) logstash(v) ]
    Notifications      ok  [ influxdb(v) kapacitor(v) ]
Done

```
