Deploy RabbitMQ on Raspberry Pi 3 (RPI3) via Pantahub
Tags: pantahub, rabbitmq, rpi3, iot
Published: 2020-08-04 03:12:26

> Note:Pantahub is the only place where Linux firmware can be shared and deployed for any device, You can signup @pantahub here:http://www.pantahub.com


## Make your RPI3 device ready to deploy RabbitMQ by following 6 Steps
### Step 1: Burn the RPI3 initial stable image into your sd card.
  
#### a) Download RPI3 image
 [ Click to download](https://pantavisor-ci.s3.amazonaws.com/pv-initial-devices/tags/012-rc2/162943661/rpi3_initial_stable.img.xz)
 
#### b) unxz the device image
  Run `$ unxz rpi3_initial_stable.img.xz`
 
#### c) Burn image into sd card using  Raspberry  Pi Imager 1.2
 
  ![](https://i.imgur.com/3tnobOw.png =400x300)


### Step 2: Boot your RPI3 
      
#### a) Insert your sd card and supply the power
  ![](https://i.imgur.com/x4WF2Tz.jpg =400x300)
  

### Step 3: Singup @pantahub here http://www.pantahub.com

### Step 4: Download & Install a CLI tool "pvr" 

> Note: pvr is a CLI tool which can be used to interact with your device through pantahub platform.
> Note: Using pvr you can share your firmware and projects as simple as with a git tree:
> Note: Move the pvr binary to your bin folder after download.

Linux(AMD64): [Download](https://gitlab.com/pantacor/pvr/-/jobs/595489669/artifacts/raw/pvr-012.linux.amd64.tar.gz#latest)
Linux(ARM32v6): [Download](https://gitlab.com/pantacor/pvr/-/jobs/595489669/artifacts/raw/pvr-012.linux.armv6.tar.gz#latest)
Darwin(AMD64): [Download](https://gitlab.com/pantacor/pvr/-/jobs/595489669/artifacts/raw/pvr-012.darwin.amd64.tar.gz#latest)

`pvr clone; pvr commit; pvr post`

To install from github source code:
```
$ go get gitlab.com/pantacor/pvr
$ go build -o ~/bin/pvr gitlab.com/pantacor/pvr
```

> Note: You need "GOLANG" to be installed in your system for building pvr from github source code.


### Step 5: Detect & Claim your device

#### a) Connect a LAN cable between your RPI3 & computer/Router.
  ![](https://i.imgur.com/Y6q6J0o.png =400x300)
  
#### b) Open your terminal & run `$ pvr scan`
 ![](https://i.imgur.com/bDQP8rb.png)


#### c) Claim your device
   `$ pvr claim -c merely-regular-gorilla https://api.pantahub.com:443/devices/5f1b9c44e193a5000afa9901`
   
 ![](https://i.imgur.com/v4CzwdR.png)

  
#### d) Log into Panthub.com and check whether the newly claimed device appeared in the dashboard or not.
  ![](https://i.imgur.com/Jmhqr53.png)
  ![](https://i.imgur.com/CuqFEQI.png)


 
### Step 6: Clone the device to your computer using the Clone URL of your device

`$ pvr clone https://pvr.pantahub.com/sirinibin/presently_learning_pelican/0 presently_learning_pelican` 
  
  ![](https://i.imgur.com/4xl9tN3.png)
  
  
  
> Now your device is ready to deploy your RabbitMQ app  


## Deploy your RabbitMQ app to the device by following 5 Steps


### Step 1: Move to device root dir
     `$ cd presently_learning_pelican`

### Step 2: Add a new app "rabbitmq" into the device
>`sirinibin/arm32v7-rabbitmq:3.8.6-rc.1` is a Docker image made for the devices with ARM32 architecture
>> You can customise the docker image for your custom requirements.

  `$ pvr app add rabbitmq --from=sirinibin/arm32v7-rabbitmq:3.8.6-rc.1`
  
  ![](https://i.imgur.com/5Eo28Eb.png)



### Step 3: Deploy the changes to the device
 ```
 $ pvr add .
 $ pvr commit
 $ pvr post
```
 ![](https://i.imgur.com/4dSD5Wr.png)


### Step 4: Check the device status changes in Pantahub.com dashboard & wait for the status to become **"DONE**"
  Status 1:
  ![](https://i.imgur.com/eCtxpPt.png)
  Status 2:
  ![](https://i.imgur.com/rmpqCdE.png)
  Status 3:
  ![](https://i.imgur.com/cmz5jqU.png )
  Status 4:
  ![](https://i.imgur.com/K4jfved.png)
  
 
### Step 5: Verify the "rabbitmq" app deployment
   
  Access the device IP: http://10.42.0.231:15672  in your web browser.
  ![](https://i.imgur.com/p7UNO96.png)

  Login guest/guest
  ![](https://i.imgur.com/QAIgOL1.png)


> You are done!