Help needed to create Snap-like website

Please, help! Any suggestion is welcome!!

I'm trying to follow instructions at https://github.com/snap-cloud/snapCloud/blob/master/INSTALL.md to create a snap-like website on a DigitalOcean Ubuntu 18.04 (LTS) x64 server.

I get an error when adding additional Lua packages needed for Snap!Cloud.

The steps I followed are the following ones:

  • downloaded snapcloud package:
# mkdir snapsite
# cd snapsite
# git clone --recursive https://github.com/bromagosa/snapCloud.git
  • installed lua:
# apt-get install lua5.1
# sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates
# wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
# echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"  | sudo tee /etc/apt/sources.list.d/openresty.list
# sudo apt-get update
# sudo apt-get -y install openresty
  • installed luarocks
# apt-get install luarocks
# cd snapCloud
# luarocks install snap-cloud-beta-0.rockspec

When running the last command, I get an error when I get to the installation of luaossl. The error says that it could not find the header file for CRYPTO, suggesting to install crypto. I tried

# luarocks install luacrypto

but then it complains about openssl. So I just stopped here.

Maybe this will help you?

One of the listed solutions, that is running
# apt-get install libssl-dev
before running
# luarocks install snap-cloud-beta-0.rockspec
apparentely worked. I can know try to complete the installation process.
Thanks a lot @programmer_user.

I got (I hope without any major issues) to the point where it says You can now point your browser to http://localhost:8080 after I have run

$ foreman s

As I'm not running the Snap cloud locally, and I don't have a domain name yet, I tried using the IP of the server, that is I entered

134.209.203.190:8080

in my browser. I don't see anything. Is this already supposed to show the Snap website? Or should just I stop the foreman s (it says something about "building pages" several times and then Done, without any visible prompt) and go ahead with the Production Configuration section?

I'm sorry for asking all this, but I used to be a Linux guy back in the 1990, when there was no Internet to take into account yet :slight_smile:

I'm pretty sure those instructions are suppose to start a local development server.

I think the "Production Configuration" section should say that these are general instructions to get to a production environment?

I stopped the "foreman s" command (CTRL+C) and moved to the next section of the instructions. I have read the certs/README.md page but it seems that it is specific for the Berkeley domain? I'm speaking of where it says "You need an EECS account to do this". Is there an alternative that will work for every domain?

I guess I need some support from @cycomachead and/or @bromagosa

Any advise? Suggestion? Is there anyone that successfully installed the new snap website? I got a DigitalOcean server as @bh suggested that it was exactly the same kind of server used by the Snap! website. So I thought that the installation instructions could be easily followed (even by someone not nothing much about the low level setup of a website; in the past I modified and/or created PHP/MySQL websites, but the web server was already setup by the hosting company).

I think that the instructions are just a large hint as to how to set a Snap! cloud server up.

I don't think the team have the time and effort to fully document and maintain them.

They have their hands full just keeping on top of their own stuff :slight_smile:

This is quite common for projects that open-source their code

I myself have had to politely tell people - here is my code - this is how I think I set it up - mine works - sorry I can't help you set one up for yourself - I just don't have the spare time

Thanks for your reply @cymplecy. I understand what you say.

Anyway, I hope that some member of the team will have some spare time to help me :slight_smile: I would be really glad to maintain then a general knowledge base on how to set up your own snap-like website.

BTW, if someone would like to give a hand, I would be glad to assign to them a DigitalOcean servlet where they can experiment with me.

Unfortunately I'm really swamped with teaching, but here's a few thoughts. The instructions are definitely meant more as a loose reference for us so there's some repeatability and they definitely assume background in managing a web server.

  • If you're interested in actually hacking on the code, it's much easier to get things working not on a remote machine. The instructions there should mostly work for Linux or macOS.
  • Setups: The production instructions are what you'd want to use if you want others to easily access the website. Mostly importantly, you need to run the site on ports 80 and 443 and have SSL setup. However, anyway that you obtain SSL certs will work.
  • If you don't have a dedicated domain name, you should probably use the box's IP address in the hostname field.
  • If you're using the development setup and the remote machine, you'll need to make sure that port 8080 is exposed to the internet. I have no idea off hand if there's something that would need to be configured. But essentially going to http://xx.xx.xx.xx:8080 is probably the best way to access the website.