|
|
@@ -22,21 +22,65 @@ DB_NAME=porter
|
|
|
SQL_LITE=false
|
|
|
```
|
|
|
|
|
|
-Once you've done this, go to the root repository, and run `docker-compose -f docker-compose.dev.yaml up`. You should see postgres, webpack, and porter containers spin up. When the webpack and porter containers have finished compiling and have spun up successfully (this will take 5-10 minutes after the containers start), you can navigate to `localhost:8080` and you should be greeted with the "Log In" screen.
|
|
|
+Once you've done this, go to the root repository, and run `docker-compose -f docker-compose.dev.yaml up`. You should see postgres, webpack, and porter containers spin up. When the webpack and porter containers have finished compiling and have spun up successfully (this will take 5-10 minutes after the containers start), you can navigate to `localhost:8080` and you should be greeted with the "Log In" screen. Create a user by entering an email/password on the "Register" screen.
|
|
|
|
|
|
-Next, register your admin account. Once it's complete, it will ask you to verify your email; we will manually verify it through Postgres.
|
|
|
+At this point, you can make a change to any `.go` file to trigger a backend rebuild, and any file in `/dashboard/src` to trigger a hot reload.
|
|
|
|
|
|
-Open your terminal in the root repository and enter:
|
|
|
+## Getting PostgreSQL Access
|
|
|
+
|
|
|
+You can get `psql` access by running the following:
|
|
|
|
|
|
`psql --host localhost --port 5400 --username porter --dbname porter -W`
|
|
|
|
|
|
-It will promt you for a password. Enter `porter`
|
|
|
+This will prompt you for a password. Enter `porter`, and you should see the `psql` shell!
|
|
|
+
|
|
|
+### Setting your email to be verified
|
|
|
|
|
|
-Next, update your email in the database to `verified":
|
|
|
+If you are getting blocked out of the dashboard because your email is not verified (fixed in `v0.6.2` of Porter, so make sure you've pulled from `master` recently), you can update your email in the database to `verified":
|
|
|
|
|
|
`UPDATE users SET email_verified='t' WHERE id=1;`
|
|
|
|
|
|
-At this point, you can make a change to any `.go` file to trigger a backend rebuild, and any file in `/dashboard/src` to trigger a hot reload.
|
|
|
+## Setting up Minikube
|
|
|
+
|
|
|
+These steps will help you get set up with a minikube cluster that can be used for development. Prerequisities:
|
|
|
+- `kubectl` installed locally
|
|
|
+- Development instance of Porter is running
|
|
|
+
|
|
|
+Following the OS-specific steps to get minikube running:
|
|
|
+- [MacOS](#macos)
|
|
|
+- [Linux](#linux)
|
|
|
+
|
|
|
+If you now navigate to `http://localhost:8080`, you should see the minikube cluster attached! There will be some limitations:
|
|
|
+- **It is not possible to expose a service that you create. Whenever you create a web service, de-select the "Expose to external traffic" option.**
|
|
|
+
|
|
|
+
|
|
|
+### MacOS
|
|
|
+
|
|
|
+1. [Install minikube](https://minikube.sigs.k8s.io/docs/start/), and install the `hyperkit` driver. The easiest way to do this is via:
|
|
|
+
|
|
|
+```sh
|
|
|
+brew install minikube
|
|
|
+brew install hyperkit
|
|
|
+```
|
|
|
+
|
|
|
+2. Start minikube with the `hyperkit` driver:
|
|
|
+
|
|
|
+```sh
|
|
|
+minikube start --driver hyperkit
|
|
|
+```
|
|
|
+
|
|
|
+3. Make sure that you've downloaded the latest version of the Porter CLI, and that your development version of Porter is running. Then run:
|
|
|
+
|
|
|
+```sh
|
|
|
+porter config set-host http://localhost:8080
|
|
|
+porter auth login
|
|
|
+```
|
|
|
+
|
|
|
+4. Make sure that `minikube` is selected as the current context (`kubectl config current-context`), and then run:
|
|
|
+
|
|
|
+```sh
|
|
|
+porter connect kubeconfig
|
|
|
+```
|
|
|
|
|
|
## Setup for WSL
|
|
|
|
|
|
@@ -47,7 +91,7 @@ Follow the steps to install WSL on Windows here https://docs.microsoft.com/en-us
|
|
|
`sudo apt install xdg-utils` <br/>
|
|
|
`sudo apt install postgres`
|
|
|
|
|
|
-### Setup Proccess
|
|
|
+### Setup Process
|
|
|
|
|
|
Once WSL is installed, head to docker and enable WSL Integration.
|
|
|

|
|
|
@@ -77,4 +121,4 @@ If using Chrome, paste the following into the Chrome address bar:
|
|
|
|
|
|
And then Enable the **Allow invalid certificates for resources loaded from localhost** field.
|
|
|
|
|
|
-Finally, run `docker-compose -f docker-compose.dev-secure.yaml up` instead of the standard docker-compose file.
|
|
|
+Finally, run `docker-compose -f docker-compose.dev-secure.yaml up` instead of the standard docker-compose file.
|