Skip to content

software:server:Installing and Provisioning

Bill Green edited this page Apr 25, 2022 · 2 revisions

Installing and Provisioning

These instructions are for installing the operating system / Labpass software onto a Raspberry Pi 4. The os and server are included in a custom Ubuntu disk image which is written onto an SD card via the official Raspberry Pi Imager software. The image has custom cloud-init files for user-data and network-config. Because the user-data file contains passwords and other secrets, it is not kept in VCS.

cloud-init run at first boot and modify a few config files and set up the initial user passwords. Then it will kick off an Ansible run which will pull the epl-badge-access repo and run the playbook in the software/server/ansible directory. The playbook is responsible for installing the database, the db admin interface, and the labpass server software.

Requrements

  1. Wired ethernet port on a LAN that serves DHCP
  2. The Labpass private network is 10.11.12.0/24, so make sure the wired network is not using this.
  3. A Micro-SD card with at least 8 GB or so
  4. Laptop or desktop with a Micro-SD card interface of some kind.

Steps to provision

  1. Download and install the Raspberry Pi Imager
  2. Download the Raspberry Pi development image
  3. Insert the SD card into the computer
  4. Run the imager
  5. For Operating System, scroll all the way down to the bottom of the list and select Use custom
  6. In the file selection dialog that follows, select the image downloaded in step 2
  7. For Storage, select the SD card that was inserted into the machine
  8. Select Write and wait a few minutes for the write/verify to complete
  9. After the write is finished, remove the SD card from the computer and insert into the Raspberry Pi,
  10. Ensure the Raspberry Pi's ethernet port is connected to a Lan port on a switch or router
  11. Connect the power to the Raspbery Pi. The provisioning process should take between 30-60 minutes.

Accessing the server

  1. The Raspberry Pi will start an access point called "labpass-net", join this network from a laptop or desktop
  2. The username ansible can be used to log in to the server with SSH. The server's IP address is 10.11.12.1
  3. To access the Labpass server interface, visit http://labpass from a browser
  4. To access the admin interface for the database visit http://labpass:8080 from a browser, then select postgres for the database, 127.0.0.1 for the database server, postgres for the username. It is suggested to avoid mucking around with the DB without good reason, lest you have to go though the entire provisioning process again. :)