# Pacemaker

Pacemaker provides a framework to manage the availability of resources. It's essentially the core component on a cluster that allows you to manage resource locations etc.

#### Installing

apt-get install pacemaker pcs resource-agents

yum install pacemaker pcs resource-agents

#### Configuration

<div class="color1" id="bkmrk-add-all-hosts-relate">Add all hosts related to the cluster to /etc/hosts (including the host you're on, also remove any reference to localhost/ 127.0.0.1)</div><div class="color1" id="bkmrk-"></div><div class="color1" id="bkmrk-set-password-for-hac">Set password for hacluster user:</div>```
passwd hacluster
```

<div class="color1" id="bkmrk-authorise-the-nodes-">authorise the nodes to be included in the cluster:</div>```
pcs host auth node01.srv.world node02.srv.world
```

start services for cluster:

```
pcs cluster start --all
```

enable services:

```
pcs cluster enable --all
```

Verify installation is working and nodes are connected:

```
pcs cluster status

pcs status corosync
```

#### Deleting a cluster installation

```
pcs cluster stop --all

pcs cluster destroy --all
```