Mike Arpaia 3a9381c5b3 React Base (#61)
* Add sensible React base to the app for frontend

This PR attempts to "reactify" Kolide and provide a sane development environment
that a front-end engineer would probably expect.

This PR accomplishes by doing the following:

1. Reorganizes the app into a `server/` and `client/` folders to keep golang
logic separated from react logic.

2. Adds an "asset pipeline" via webpack which knows how to build a js
and css bundle.

3. Packages up all static assets in a go-bindata file so that the binary
remains portable without external file dependencies.

1. Add a Makefile with several targets that will be common in everyday
development. For example, we have `serve` target which spins up a nodejs
reverse proxy on port 8081 which then watches for changed files, automatically
rebuilds the app, and hot loads the new JS/CSS in.

 **Note:** Please use `make` to build the app, not `go build` as there are
now several things that need to be orchestrated beyond the go code to build the app.

* Create build if it doesn't exist, and use `go get`

* Improve README to reflect new dev workflow

* Document css vars and funcs and use alias paths

* makefile and structure modifications
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00
2016-08-09 22:15:44 -07:00

Kolide CircleCI

Building

To build the code ensure you have node and npm installed run the following from the root of the repository:

make

This will produce a binary called kolide in the root of the repo.

Testing

To run the application's tests, run the following from the root of the repository:

go vet ./... && go test -v ./...

Development Environment

To setup a working local development environment run perform the following tasks:

Once those tools are installed, to set up a canonical development environment via docker, run the following from the root of the repository:

docker-compose up

This requires that you have docker installed. At this point in time, automatic configuration tools are not included with this project.

Once you docker-compose up and are running the databases, you can build the code and run the following command to create the database tables:

kolide prepare-db

To install all JavScript dependencies, run

npm install

Now you are prepared to run a Kolide development environment. Run the following:

make serve

You may have to edit the example configuration file to reflect localhost if you're using Docker via a native docker engine or the output of docker-machine ip if you're using Docker via docker-toolbox.

If you'd like to shut down the virtual infrastructure created by docker, run the following from the root of the repository:

  1. Start up all external servers with docker-compose up

By default, the last command will run the development proxy on http://localhost:8081 which allows you to make live changes to the code and have them hot-reload.

Docker Deployment

This repository comes with a simple Dockerfile. You can use this to easily deploy Kolide in any infrastructure context that can consume a docker image (heroku, kubernetes, rancher, etc).

To build the image locally, run:

docker build --rm -t kolide .

To run the image locally, simply run:

Improve README to reflect new dev workflow

docker-compose down
S
Description
No description provided
Readme MIT
1.6 GiB
Languages
Go 52.5%
TypeScript 37.5%
JavaScript 4.3%
PowerShell 1.4%
Augeas 0.9%
Other 3%