Skip to content

Instantly share code, notes, and snippets.

@kalimar
Last active October 20, 2022 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kalimar/ed14b5d026220ee5cd81d416b4f67b7b to your computer and use it in GitHub Desktop.
Save kalimar/ed14b5d026220ee5cd81d416b4f67b7b to your computer and use it in GitHub Desktop.
Instructions for Setting ATC NUCs

NUC SETUP

Create a bootable installer for Ubuntu 18.04.1 per these instructions

Setup Terrastories

Install Git and Curl

sudo apt-get update sudo apt-get install git sudo apt-get install curl

Docker

Install Docker

Install Docker-compose

Install Terrastories

Readme

Configure NUC to be a Server

Configure Hotspot

Modify the hotspot password to something easy to remember. Use the advanced network editor which is launched from terminal nm-connection-editor

Confirm there is a hotspot network nmcli con show

Now make it autoconnect on reboot nmcli con mod <Hotspot-network-name> connection.autoconnect yes

=> Make sure none of your wifi connections are enabled to connect automatically <=

Configure Host name

Edit the file as sudo (nano is a command line text editor that comes with linux)

sudo nano /etc/hosts

Edit hosts to this:

127.0.0.1       terrastories.io
127.0.1.1       terrastories.io

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

You only need to edit the first two lines that contain terrastories.io the remainder will already be there. I just included it for context.

@rudokemper
Copy link

@rudokemper
Copy link

Another thing to add: bypass login screen on boot
https://askubuntu.com/questions/256239/how-to-bypass-login-screen-on-boot

@rudokemper
Copy link

Installing SSH (because it's useful): https://www.simplified.guide/ubuntu/install-ssh-server

@rudokemper
Copy link

The NUC doesn't have the codecs to process H.264 videos. Easily resolved by installing sudo apt-get install ubuntu-restricted-extras

@csexton
Copy link

csexton commented Jun 2, 2019

Couple of changes we made to the NUC:

Hostname

To get the hostname Terrastories.io to work everywhere:

Step 1: Use a static ip

ref

  1. Edit /etc/NetworkManager/system-connections/Hotspot
  2. Under the ipv4 section
  3. Add address1=192.168.0.1/24

Step 2: Set hosts

Edit /etc/hosts and add the line:

192.168.0.1 terrastories.io

Make sure there are no other entries for terrastories.io

Port Number

Step 1: Configure nginx.conf to use default port:

Remove the :3000 from the two proxy_set_header lines in nginx/nginx.conf in the repo

Step 2: Set NGINX_PORT

NGINX_PORT=80 docker-compose up -d

@rudokemper
Copy link

Ubuntu shutdown: gsettings set org.gnome.settings-daemon.plugins.power button-power 'shutdown'

@rudokemper
Copy link

^ the above shutdown solution (posted June 2) might only work on older versions of Ubuntu. On 18.04, the following works;

In Ubuntu 18.04 or any similar Linux variants with acpi (if not you can probably install), make a file called /etc/acpi/events/power with

sudo nano /etc/acpi/events/power

and put

event=button/power
action=/sbin/poweroff

inside the file, close it, then

sudo service acpid restart

@rudokemper
Copy link

Instructions for operating a Terrastories mini-computer (for field deployment / usage, once it's been set up using the above);

https://acteam.sharepoint.com/:b:/g/ACTUS/mapping/EbzGbP3dSDVPmmTsKToYlLQBA72Tza8cWKWsA7KzTlMB0w

@rudokemper
Copy link

Lastly, to keep Terrastories running upon successive NUC device restarts, I had to add restart: always to the db, web, and web-test services in the docker-compose.yml file. The TileServer-GL server already had this set in docker-compose.offline.yml.

@rudokemper
Copy link

Change name of SSID network in Hotspot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment