Comments (3)
I'm going to need a bit of guidance on a few bits of this:
- prerequisites for production mode rather than dev mode (i.e., start RethinkDB server separately, etc.)
- how to use
hz make-token
to get the admin user admin-ing - basic advice about self-hosted deployment (i.e., is
hz serve
production ready or should they run a "real" web server and proxy to it, other general node stuff) - anything about Horizon Cloud and DO support that's impending
from horizon-docs.
prerequisites for production mode
- Starting your own RethinkDB server, or setting the
start-rethinkdb
option explicitly - An SSL key/certificate pair (unless you want to run with
secure=false
) - A schema file that includes all collections, indexes and permissions, which you can install through
hz set-schema
- In fact you need to run
hz set-schema
once before you start the Horizon servers so that it can initialize the internal Horizon databases in RethinkDB. - The correct
bind
setting to expose Horizon publicly
how to use hz make-token
to get the admin user admin-ing
We will improve this interface, but at the moment you have to do the following:
- Run
hz make-token <project path> admin
. This will print a token that is valid for one day. - Start the Horizon server if you haven't done so yet
- In the browser, open the Horizon application. Then open the JavaScript console and run the following command:
horizon.utensils.tokenStorage.set("<the token from make-token>")
I assume here that the application defined a horizon
object which is an instance of the Horizon
class. If the instance has a different name, use that instead. Or if there isn't one, you have to instantiate Horizon first:
var hz = Horizon();
hz.utensils.tokenStorage.set("<the token from make-token>");
- The application should now be authenticated as "admin" and can perform any administrative task through the browser (e.g. modifying the
users
collection in order to add users to groups)
Open question: Assume that the user wants to do the administrative task(s) through a node.js script rather than through the browser. How would one require the Horizon client in a node script and set the token in there? @deontologician ideas on if/how that could work?
self-hosted deployment
I believe it's fine to run hz serve
by itself. There might be some questions about rate limiting to protect against DoS attacks. There also is the question of how to log requests, and how to start the server on system startup etc. I'm not sure if we have developed any best practices for these things yet. @encryptio @mlucy might have some tips.
Horizon Cloud and DO support
Horizon cloud will soon offer extremely a very simple way for deploying Horizon apps in the cloud. DigitalOcean offers a one-click Horizon droplet, see https://www.digitalocean.com/community/tutorials/how-to-use-the-horizon-one-click-install-image
from horizon-docs.
We need to provide a better interface in the client for using a token to authenticate. Right now we can use the utensils thing (which is really a non-official api), but it would be nice if users could create a horizon client instance and specify the token they want to use, without forcing the client to talk to localStorage. I'll open an issue for this
from horizon-docs.
Related Issues (20)
- Upgrade docker-compose files to v2 of the docker-compose file spec HOT 8
- Document integration with specific frameworks (React etc.) HOT 2
- Users doc misleading
- cookbook entry: subscribing to changing data
- Horizon 2.0 docs checklist HOT 27
- Document `Collection.update`, `Collection.insert` and correct existing write commands
- Clarify client constructor host option
- .filter() listed twice in Observable's methods. HOT 1
- We need a guide on "Deploying Horizon"
- New page about Horizon client packaging HOT 2
- Section headers should be clickable to put the fragment in the URL path
- Document admin user requirement
- Permissions only mentions `.find` once but it isn't clear if using `.findAll` covers `.find`? HOT 2
- Auth documentation needs to show boilerplate on how to handle connections by unauth'd and auth'd users
- Embedding docs incorrectly uses `_reql_conn` as a property of the server module HOT 2
- Document how to use JWT generated using CLI
- horizon js can not access rethinkdb in port 28025 without --dev flag . Error : action not permitted .
- Docs at http://horizon.io/docs/auth/ don't say what callback URL to use HOT 8
- Include section in FAQ on why full ReQL queries aren't supported in Horizon
- Document .aggregate and .model HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from horizon-docs.