decentraland / bronzeage-node

DEPRECATED: This codebase will not be mantained anymore, and formats are going to change when we move to the Decentraland Iron Age
https://decentraland.org
Other
104 stars 22 forks source link

Add the packaging metadata to build the decentraland snap #82

Closed come-maiz closed 7 years ago

come-maiz commented 7 years ago

This package will let you publish the latest decentraland in the Ubuntu store, and from there reach many users on all the supported Ubuntu versions, and more Linux distributions in progress.

come-maiz commented 7 years ago

Hello!

I would like to see decentraland in the Ubuntu store, so all our users can install it with one click from the software center. I started here making the metadata for the snap package, but I have a big problem.

One of the objectives of snaps is to be more secure than the traditional packaging systems. So, the package is not installed in the traditional sense. Instead, the code is just mounted read-only. That's a problem because decentraland tries to create a data directory in the same dir as the code:

│Error: EROFS: read-only file system, mkdir '/snap/decentraland/x3/lib/node_modules/decentraland/data'

As far as I could see, there is no config option to specify a different data directory. Or maybe, I just couldn't find it. Could you give me a hand here?

To test this in Ubuntu 16.04:

$ sudo apt install git snapcraft
$ git clone https://github.com/elopio/bronzeage-node
$ cd bronzeage-node
$ git checkout snapcraft
$ snapcraft
$ sudo snap install *.snap --dangerous

You can find more information about snaps in https://snapcraft.io

martriay commented 7 years ago

@elopio hello! Nice efforts in here!

In bin/start you can see there is a --prefix parameter for the data folder:


  --fast \
  --loglevel=info \
  --port=2301 \
  --httpport=8301 \
  --contentport=9301 \
  --prefix="data" \
  --n=testnet \
  --apikey=$RPC_API_KEY \
  --startminer=$START_MINER```
come-maiz commented 7 years ago

Thanks @martriay! I think this is now ready for a review.

martriay commented 7 years ago

LGTM 🎉

martriay commented 7 years ago

@elopio just noticed, snap name/descriptions seems to be the default ones, should we change them?

come-maiz commented 7 years ago

Awesome!!! Thanks for the merge.

Now you can go to https://build.snapcraft.io, and configure in there the continuous delivery to the store. The snap will be in the edge channel, which is not visible for user searches, but it's perfect to start testing.

Once you are ready, let me know and we can make a call for testing with the Ubuntu community of testers, like this: https://forum.snapcraft.io/t/call-for-testing-ipfs/97

come-maiz commented 7 years ago

oh damn! I'm sorry @martriay. I'll make a PR with updated summary and description. I was a little sleepy when I gave up on the data dir last night.