Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation on a DigitalOcean droplet #44

Closed
TrystanLea opened this issue Oct 2, 2019 · 9 comments
Closed

Installation on a DigitalOcean droplet #44

TrystanLea opened this issue Oct 2, 2019 · 9 comments

Comments

@TrystanLea
Copy link
Member

TrystanLea commented Oct 2, 2019

Note: For a single user with moderate use, a small VM on a cloud service is likely plenty of performance for an emoncms installation. For applications with a large number of users and feeds the performance of emoncms will depend a lot on how the cloud provider implements storage. Networked disk drives will result in slow performance due to the network latency associated with the way the emoncms feed engines are implemented. VM's on machines with local storage should provide much better performance.

1. Click on 'Create' to create a new cloud server
2. Select Ubuntu, standard $5/month, region e.g London then Create Droplet
3. DigitalOcean email root login details, ssh in using these credentials.
4. Change root password
5. Follow Initial Server Setup with Ubuntu 18.04

adduser oem
usermod -aG sudo oem
ufw allow OpenSSH
ufw enable

logout of root and login with oem.

6. Disable root login:

sudo nano /etc/ssh/sshd_config
PermitRootLogin no
sudo service ssh restart

7. Allow created user to run sudo without password.

sudo visudo

Add to end of visudo file:

oem ALL=(ALL) NOPASSWD:ALL

Save and exit.

8. Start the script

wget https://raw.githubusercontent.com/openenergymonitor/EmonScripts/master/install/init.sh
chmod +x init.sh
./init.sh

9. Modify config.ini for non emonSD installation.

Disable emonhub installation

install_emonhub=false

Disable firmware, emonpilcd, emonsd, wifiap installation

install_firmware=false
install_emonpilcd=false
install_emonsd=false
install_wifiap=false

Set user as applicable and set emonSD_pi_env=0

user=oem
hostname=emonpi
emonSD_pi_env=0

Comment out config, wifi and setup module:

#emoncms_modules[config]=stable
#emoncms_modules[wifi]=stable
#emoncms_modules[setup]=stable

10. Run main installation script:

./main.sh

11. Allow access to port 80 in firewall:

sudo ufw allow 80/tcp
@TrystanLea
Copy link
Member Author

TrystanLea commented Oct 2, 2019

Issues:

  • non_emonsd.sh did not run, fixed cce660c
  • emoncms register does not disappear after first user creation, fixed: emoncms/emoncms@02f3de3
  • services
  • missing permissions for /var/log/emoncms, now fixed b3bfec6
  • emoncms update UI includes items not installed: firmware & emonhub
  • emoncms config module should not be installed

@TrystanLea
Copy link
Member Author

2nd test, with issues above fixed now works a treat!

Remaining issue: emoncms update UI includes items not installed: firmware & emonhub

@TrystanLea
Copy link
Member Author

@borpin I've integrated the service file modifications using the drop-ins to /lib/systemd/.. all working well

@borpin
Copy link
Contributor

borpin commented Oct 2, 2019

  • emoncms config module should not be installed

2nd test, with issues above fixed now works a treat!

Did you comment the modules out or is there a logic test?

My last install, I found WiFi installed unless I commented that module out too.

@TrystanLea
Copy link
Member Author

Yes I commented them out. I will work on improved logic in the next version

@TrystanLea
Copy link
Member Author

Latest install test on digitalocean went well, no issues everything running as expected.

@borpin
Copy link
Contributor

borpin commented Oct 3, 2019

Perhaps a 'Digital Ocean' sample config file might help in the repo especially as it will not just be changing values?

@borpin
Copy link
Contributor

borpin commented Oct 7, 2019

Added to documentation. #51

@borpin
Copy link
Contributor

borpin commented Oct 16, 2019

This can probably be closed @TrystanLea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants