diff --git a/docs/docs/building-and-running.md b/docs/docs/building-and-running.md index eb4639a649..bc7ca6a451 100644 --- a/docs/docs/building-and-running.md +++ b/docs/docs/building-and-running.md @@ -6,17 +6,17 @@ These instructions assume you are using a Bash shell. You can easily get a Bash You need to install following in order to build MAGDA: -- [Node.js](https://nodejs.org/en/) - To build and run the TypeScript / JavaScript components, as well as many of the build scripts. Version 9+ works fine as of March 2018. -- [Java 8 JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) - To run the JVM components, and to build the small amount of Java code. -- [sbt](http://www.scala-sbt.org/) - To build the Scala components. -- [yarn](https://yarnpkg.com/) - Npm replacement that makes node deps in a monorepo much easier. +- [Node.js](https://nodejs.org/en/) - To build and run the TypeScript / JavaScript components, as well as many of the build scripts. Version 9+ works fine as of March 2018. +- [Java 8 JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) - To run the JVM components, and to build the small amount of Java code. +- [sbt](http://www.scala-sbt.org/) - To build the Scala components. +- [yarn](https://yarnpkg.com/) - Npm replacement that makes node deps in a monorepo much easier. To push the images and run them on kubernetes, you'll need to install: -- [GNU tar](https://www.gnu.org/software/tar/) - (Mac only) MacOS ships with `BSD tar`. However, you will need `GNU tar` for docker images operations. On MacOS, you can install `GNU Tar` via [Homebrew](https://brew.sh/): `brew install gnu-tar` -- [gcloud](https://cloud.google.com/sdk/gcloud/) - For the `kubectl` tool used to control your Kubernetes cluster. You will also need to this to deploy to our test and production environment on Google Cloud. -- [Helm 3](https://helm.sh/docs/intro/install/) to manage kubernetes deployments and config. Magda `0.0.57` and higher requires helm 3 to deploy. -- [Docker](https://docs.docker.com/install/) - Magda uses `docker` command line tool to build docker images. +- [GNU tar](https://www.gnu.org/software/tar/) - (Mac only) MacOS ships with `BSD tar`. However, you will need `GNU tar` for docker images operations. On MacOS, you can install `GNU Tar` via [Homebrew](https://brew.sh/): `brew install gnu-tar` +- [gcloud](https://cloud.google.com/sdk/gcloud/) - For the `kubectl` tool used to control your Kubernetes cluster. You will also need to this to deploy to our test and production environment on Google Cloud. +- [Helm 3](https://helm.sh/docs/intro/install/) to manage kubernetes deployments and config. Magda `0.0.57` and higher requires helm 3 to deploy. +- [Docker](https://docs.docker.com/install/) - Magda uses `docker` command line tool to build docker images. You'll also need a Kubernetes cluster - to develop locally this means installing either [minikube](./installing-minikube.md) or [docker](./installing-docker-k8s.md) (MacOS only at this stage). We've also started trialing [microk8s](./building-and-running-on-microk8s) on Linux, but we're not sure how well it's going to work long-term. Potentially you could also do this with native Kubernetes, or with a cloud cluster, but we haven't tried it. @@ -224,7 +224,8 @@ It's also possible to run what you're working on your host, and the services you This is super-easy, just run ```bash -kubectl port-forward combined-db-0 5432:5432 +kubectl port-forward combined-db-postgresql-0 5432:5432 +# or kubectl port-forward combined-db-0 5432:5432 prior to Magda v1.0.0 ``` Now you can connect to the database in minikube as if it were running locally, while still taking advantage of all the automatic schema setup that the docker image does. @@ -338,7 +339,8 @@ helm install --name magda deploy/helm/magda -f deploy/helm/minikube-dev.yml --se ```bash # Port forward database # this command doesn't terminate, so run it in a separate terminal -kubectl port-forward combined-db-0 5432:5432 +kubectl port-forward combined-db-postgresql-0 5432:5432 +# or kubectl port-forward combined-db-0 5432:5432 prior to Magda v1.0.0 ``` 3. Start the registry API by executing the following command diff --git a/docs/docs/how-to-create-api-key.md b/docs/docs/how-to-create-api-key.md index 30944cdb4f..516aad94e6 100644 --- a/docs/docs/how-to-create-api-key.md +++ b/docs/docs/how-to-create-api-key.md @@ -4,11 +4,13 @@ Magda API keys provide users an alternative option to authenticate their request Before start to use the `create-api-key` script, you need to: -- Clone Magda repo -- Run `yarn install` to install all dependencies -- Port forward the Magda database to local: - - `kubectl port-forward combined-db-0 5432:5432` - - If you didn't install magda to the default namespace, you can use: `kubectl port-forward -n [namespace] combined-db-0 5432:5432` +- Clone Magda repo +- Run `yarn install` to install all dependencies +- Port forward the Magda database to local: + - `kubectl port-forward combined-db-postgresql-0 5432:5432` + - If you didn't install magda to the default namespace, you can use: `kubectl port-forward -n [namespace] combined-db-postgresql-0 5432:5432` + +> Prior to Magda v1.0.0, you should port-forward pod combined-db-0 After the installation is done, run `yarn create-api-key` will list help information as below: diff --git a/docs/docs/how-to-create-local-users.md b/docs/docs/how-to-create-local-users.md index fcec1cd61e..9e6d7330f1 100644 --- a/docs/docs/how-to-create-local-users.md +++ b/docs/docs/how-to-create-local-users.md @@ -6,11 +6,13 @@ Magda now support creating local authenticated users (instead of SSO). You can u Before start to use the `set-user-password script, you need to: -- Clone [magda-auth-internal repo](https://github.com/magda-io/magda-auth-internal) -- Run `yarn install` to install all dependencies -- Port forward the Magda database to local: - - `kubectl port-forward combined-db-0 5432:5432` - - If you didn't install magda to the default namespace, you can use: `kubectl port-forward -n [namespace] combined-db-0 5432:5432` +- Clone [magda-auth-internal repo](https://github.com/magda-io/magda-auth-internal) +- Run `yarn install` to install all dependencies +- Port forward the Magda database to local: + - `kubectl port-forward combined-db-postgresql-0 5432:5432` + - If you didn't install magda to the default namespace, you can use: `kubectl port-forward -n [namespace] combined-db-postgresql-0 5432:5432` + +> Prior to Magda v1.0.0, you should port-forward pod combined-db-0 After the installation is done, run `yarn set-user-password` will list help information as below: diff --git a/docs/docs/how-to-set-user-as-admin-user.md b/docs/docs/how-to-set-user-as-admin-user.md index 248d2ea0d6..6882700fdd 100644 --- a/docs/docs/how-to-set-user-as-admin-user.md +++ b/docs/docs/how-to-set-user-as-admin-user.md @@ -10,9 +10,11 @@ Please refer to [acs-cmd utility NPM page](https://www.npmjs.com/package/@magda/ Before start to use the [acs-cmd](https://www.npmjs.com/package/@magda/acs-cmd) utility, you need to: -- Port forward the Magda database to local: - - `kubectl port-forward combined-db-0 5432:5432` - - If you didn't install magda to the default namespace, you can use: `kubectl port-forward -n [namespace] combined-db-0 5432:5432` +- Port forward the Magda database to local: + - `kubectl port-forward combined-db-postgresql-0 5432:5432` + - If you didn't install magda to the default namespace, you can use: `kubectl port-forward -n [namespace] combined-db-postgresql-0 5432:5432` + +> Prior to Magda v1.0.0, you should port-forward pod combined-db-0 To set a user as admin users: diff --git a/docs/docs/windows-instructions.md b/docs/docs/windows-instructions.md index 403f7204f5..79811ab298 100644 --- a/docs/docs/windows-instructions.md +++ b/docs/docs/windows-instructions.md @@ -1,3 +1,5 @@ +> This document might require some updates since we upgarded to postgreSQL 13 in Magda v1.0.0 + This is how @mwu2018 set up his Windows machine (Precision 7730) to develop Magda - it's here as a reference in case you get stuck on something when development Magda under Windows. 1. Enable hyper-v diff --git a/magda-registry-api/README.md b/magda-registry-api/README.md index 3f50c591ec..2104711ef7 100644 --- a/magda-registry-api/README.md +++ b/magda-registry-api/README.md @@ -17,7 +17,7 @@ cd helm upgrade test2 deploy/helm/magda --namespace test2 --install --recreate-pods -f deploy/helm/local-auth-test.yml --set tags.all=false --set tags.combined-db=true --set tags.authorization-db=true --set tags.registry-db=true -kubectl.exe -n test2 port-forward combined-db-0 5432:5432 +kubectl.exe -n test2 port-forward combined-db-postgresql-0 5432:5432 ``` If on Windows 10, run diff --git a/packages/acs-cmd/README.md b/packages/acs-cmd/README.md index 00f220fea5..4b5055c6e0 100644 --- a/packages/acs-cmd/README.md +++ b/packages/acs-cmd/README.md @@ -49,8 +49,10 @@ Commands: > You will need to port forward the Magda database to localhost to make sure the utility can connect to your Magda database. -- To do so, You can run `kubectl port-forward combined-db-0 5432`. - - If you didn't install magda to the default namespace, you can use: `kubectl port-forward -n [namespace] combined-db-0 5432` +- To do so, You can run `kubectl port-forward combined-db-postgresql-0 5432`. + - If you didn't install magda to the default namespace, you can use: `kubectl port-forward -n [namespace] combined-db-postgresql-0 5432` + +> Prior to Magda v1.0.0, you should port-forward pod combined-db-0 #### Example diff --git a/packages/org-tree/README.md b/packages/org-tree/README.md index cfac417b54..20457ace7d 100644 --- a/packages/org-tree/README.md +++ b/packages/org-tree/README.md @@ -68,8 +68,10 @@ Commands: > You will need to port forward the Magda database to localhost to make sure the utility can connect to your Magda database. -- To do so, You can run `kubectl port-forward combined-db-0 5432`. - - If you didn't install magda to the default namespace, you can use: `kubectl port-forward -n [namespace] combined-db-0 5432` +- To do so, You can run `kubectl port-forward combined-db-postgresql-0 5432`. + - If you didn't install magda to the default namespace, you can use: `kubectl port-forward -n [namespace] combined-db-postgresql-0 5432` + +> Prior to Magda v1.0.0, you should port-forward pod combined-db-0 #### Example