stacks-archive / blockstack-browser

The Blockstack Browser
Mozilla Public License 2.0
1.12k stars 199 forks source link

Improved Linux Install and Overall Experience #1080

Open kantai opened 7 years ago

kantai commented 7 years ago

The current Linux install experience and instructions are a little bit lacking. We give users a script which tries to setup a docker environment for running the browser service and a local api endpoint.

There's a routes to go towards improving this experience.

  1. Improve the Docker Experience a. Issues with the script -- it seems like the biggest issue is in password selection. We could just try to auto-select a password, and then pass this along to xdg-open -- or output it after startup. b. Other script issues? Sometimes blockstack-api fails to start, I believe because the registrar lock isn't getting cleaned up. c. The images are huge. Like 1GB. d. Docker is a pain to set up on a bunch of different platforms

  2. Ship a Virtualbox image or QEMU image a. We need to still perform the setup -- so the password is still an issue. b. Would users access the browser from inside the VM? c. How do we automate building these images?

  3. Recommend pip plus a package for the browser? a. pip works fine, but there's still an issue of configuration and setup. b. would also need to solve the problem of packaging the browser -- we have an apt package, which would work, but again, that's something that needs to be attended to. c. alternative to pip is also just to do a deb package but with the full virtualenv, dhvenv I think is the route people go here.

  4. An orchestration app like what macOS has now.

kantai commented 7 years ago

Tagging @jcnelson @jackzampolin for insight on this.

jcnelson commented 7 years ago

Re Option 2:

I'm happy to take a stab at this option. I think it offers the most consistent user experience, especially in light of how may corner-cases and gotchas there are to getting Docker working on a given Linux distro.

vsund commented 7 years ago

I'm not sure whether option 2 is good for usability. Isn't it too much effort to start a VM everytime you want to access the browser?

kantai commented 7 years ago

On using an in-VM browser for option 2: UI things inside of a VM are consistently Very Annoying, like Copy-and-Paste

kantai commented 7 years ago

What setup do we need to do? Can't we just automatically generate API passwords and encryption passwords?

Yes, basically just that. Those can just be generated on the VM's first boot I suppose.

It's not too bad. We can just kick off a script that will pull directly from git and run some initial setup commands.

Is that when the VM boots? Or does the VM image already have everything installed?

jcnelson commented 7 years ago

I'm not sure whether option 2 is good for usability. Isn't it too much effort to start a VM everytime you want to access the browser?

The status quo is that most users have difficulty getting Docker installed and running correctly. Even for the ones that have Docker installed correctly, not everyone has the XDG tools installed and configured. This breaks protocol handling in hard-to-debug ways. Shipping a VM with everything inside already configured would increase UI consistency.

On using an in-VM browser for option 2: UI things inside of a VM are consistently Very Annoying, like Copy-and-Paste

Since we control everything inside the VM, we can just script it to install the Virtualbox guest add-ons. This would enable copy-and-paste on all OSs.

Is that when the VM boots? Or does the VM image already have everything installed?

My approach would be to set up a vanilla QEMU image, and create a CI script that would:

The vanilla QEMU image would be set up to auto-login, start Blockstack, and and run Chromium full-screen on localhost:8888. The CI system would simply install Blockstack from git to generate a virtualbox image for each release.

jackzampolin commented 7 years ago

So for me this just seems like we are adding yet another install path that will be not maintained, will be under documented, and is soon-to-be depreciated. This sounds to me like a classic bad idea. If you are coming to VBox with no context (which I would say is a lot of users) that and docker both have a very similar amount of learning overhead.

With this solution we will be switching one virtualization engine for another with limited gains. I understand the criticisms of the current install path, but I feel like putting in the effort to do another one that will have equally bad support and docs moving forward just makes our problems worse not better.

@jcnelson @kantai

ErikBjare commented 7 years ago

@jackzampolin nailed it.

You should try to avoid virtualization and containerization if you want to make it easy for end users; switching from Docker to a VM won't make it easier. Not to be an ass about it, but I can't believe you actually thought shipping an end-user application as a VM would be a good idea.

Why do you need containerization in the first place? I'm legitimately curious, I sure you have some reason, I just doubt it's a good one in the long run.

Why can't you just put in the work and do what every other application does: simply ship a zip with precompiled binaries, or a proper deb package. Is it really that hard to get it working?

The best solution would be if you could build an AppImage or flatpak. That would be a great solution not too far from how .app bundles work on macOS.

kantai commented 7 years ago

With this solution we will be switching one virtualization engine for another with limited gains. I understand the criticisms of the current install path, but I feel like putting in the effort to do another one that will have equally bad support and docs moving forward just makes our problems worse not better.

Yeah, I'm kind of inclined towards the "let's not try to fix an old problem with a slightly different trick" argument, especially if we haven't finished fleshing out the exact problems we're trying to solve with a new path.

Positives of new path:

  1. Less situational-dependent: volume mounting in aufs in Docker is legitimately confounding of blockstack-core in a number of different ways (the secret passing file checks, pid files, /tmp/ directories), and these manifest differently in different host OS's.
  2. Skirts any issues with the protocol handler using xdg-open which doesn't exist on all Linux distros.
  3. Virtualbox is easier to install and setup than Docker
  4. No question anymore of "is blockstack running?" -- if the VM is running, blockstack will be running.
  5. No port binding issues

@jackzampolin -- do you think these benefits are still too minimal to merit a VM?

jackzampolin commented 7 years ago
  1. These are issues I believe need to be fixed in blockstack-core to enable larger deployments. I've been opening issues to try and fix some of the problems you are mentioning here to enable the docker usercase. We know these issues exit and I think we should fix them so that we can run in docker. This will also fix some issues that we run into with the normal pip install.
  2. Valid
  3. See above. I don't believe this is a valid criticism
  4. This is prob not necessarily true. People will have to dig into the VM to debug
  5. Valid

I don't think the minimal gains merit doing the work for the VM.

jcnelson commented 7 years ago

Here are my issues right now:

I am of the opinion that a full VM makes these problems easier to address, but I don't care too much either way as long as they are addressed.

jcnelson commented 7 years ago

@ErikBjare I am happy to write a "How to install Blockstack from Source" document if you prefer.

jackzampolin commented 7 years ago

Comments on a couple of the points above:

A number of these issues could be fixed by fixing the things that make running in docker a bit painful. That seems like it would be just as much work as throwing it all out and starting anew.

ErikBjare commented 7 years ago

@jcnelson That would be great.

jackzampolin commented 6 years ago

So after meeting with @jcnelson and @kantai we decided to take a 2 pronged path: improve the docker install and document the installation from source. The docker install has the primary downside of docker being difficult to install. The from source option has the the primary downside of requiring full python (2.7) and nodejs (6.9) dev environments setup.

@jcnelson will document the from source install @jackzampolin will make the following changes to the launcher script:

larrysalibra commented 6 years ago

@kantai where are we on this?

jackzampolin commented 6 years ago

I need to pick this work back up.

arisgk commented 6 years ago

Some more feedback here: I tried to login with Blockstack using Ubuntu and it was not clear that I had to run the bash script before being able to use Blockstack Browser. I am attaching a screencast of the experience before running the script and following its instructions (xdg-open links just do nothing):

blockstack-login-ubuntu

blockpac commented 5 years ago

Any progress on the Linux install? (Preferably without using Docker)