Skip to content

Homepage installation script one-liner #139

Open
@danielledeleo

Description

@danielledeleo

Part of improving the first touch experience. (See #137)

The NGINX Unit home page should prominently feature an easy way to get started with Unit.

Summary: we need a script that installs a CLI to control Unit and Unit itself. Our current scripts and guides are not suited to a one-liner.

Inspiration

rustup.rs offers a particularly spartan way to get going.

rustup.rs screenshot

Several ideas have been floated so far in private discussions in Unit team as to the best way to go from zero to serving requests with Unit.

Docker

Many production deployments of Unit use Docker, and it also happens to be a relatively simple way to get Unit onto developers' computers. We already have a fairly in-depth guide to running Unit in Docker, but it's not simple enough as is to be put on the home page as a one liner.

Current friction points when running Unit inside of Docker:

  • Control socket requires running curl inside the container (or restarting the container to pick up modified config file)
  • Users must manually compose images to get certain combinations of modules to work (PHP+Python+Wasm, e.g.)
    • We used to provide -full images to get around this.
  • Users have to get their application code into the container (usually a Docker --mount)

What this could look like today
rustup.rs screenshot

Questions:

  • Should these commands be hidden inside of a curl ... | sh one-liner? Is that helpful?
  • Can this example be simpler? (Suggestions welcome)
  • Would it be more helpful to show users a lightly customized Dockerfile example instead?

Personally, I don't think the above image presents a great first touch experience, and I'd be thrown off if all that happened from a shell piped script.

Local install

These options could be displayed intelligently on the home page by reading the client user agent.

On macOS with Homebrew, we already have a very good one-liner:

brew install nginx/unit/unit

On Linux (including WSL), we have our existing setup-unit script:

wget https://raw.githubusercontent.com/nginx/unit/master/tools/setup-unit && chmod +x setup-unit
sudo ./setup-unit repo-config
# ... apt, yum, etc.

What's missing is a reasonable way to run something in Unit quickly.

Proposed Solution

curl --proto '=https' --tlsv1.2 -sSf https://<SOME_URL>/setup.sh | sh

What this script should do is out of scope for this issue. See (todo: link to CLI issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions