diff --git a/README.md b/README.md index b395ce5fd..f29efd415 100644 --- a/README.md +++ b/README.md @@ -23,17 +23,16 @@ You can use the chart in this repository to install Monocular in your cluster. - [Nginx Ingress controller](https://github.com/kubernetes/ingress) ```console -$ git clone https://github.com/helm/monocular.git -$ cd ./monocular -$ helm install ./deployment/monocular +$ helm repo add monocular https://helm.github.io/monocular +$ helm install monocular/monocular ``` Read more on how to deploy Monocular [here](docs/deployment.md). ## Documentation -- [Configuration](docs/configuration.md) -- [Deployment](docs/deployment.md) +- [Configuration](deployment/monocular/README.md#configuration) +- [Deployment](deployment/monocular/README.md) - [Development](docs/development.md) ## Contribute diff --git a/deployment/README.md b/deployment/README.md index b70f3f908..4f2d65bde 100644 --- a/deployment/README.md +++ b/deployment/README.md @@ -1 +1 @@ -Documentation moved [/docs/deployment.md](/docs/deployment.md) +Documentation moved [/deployment/monocular/README.md](/deployment/monocular/README.md) diff --git a/deployment/common.sh b/deployment/common.sh index 72f8f1dfe..12928de85 100755 --- a/deployment/common.sh +++ b/deployment/common.sh @@ -2,8 +2,8 @@ set -euo pipefail # $IMAGE_TAG Required: -: ${API_IMAGE:="gcr.io/helm-ui/monocular-api"} -: ${UI_IMAGE:="gcr.io/helm-ui/monocular-ui"} +: ${API_IMAGE:="bitnami/monocular-api"} +: ${UI_IMAGE:="bitnami/monocular-ui"} # Helm settings : ${SKIP_UPGRADE_CONFIRMATION:="false"} diff --git a/deployment/monocular/Chart.yaml b/deployment/monocular/Chart.yaml index dadd557ea..2004c5651 100644 --- a/deployment/monocular/Chart.yaml +++ b/deployment/monocular/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: monocular description: Monocular is a search and discovery front end for Helm Charts Repositories. -version: 0.4.2 +version: 0.4.3 appVersion: v0.2.1 home: https://github.com/helm/monocular sources: diff --git a/deployment/monocular/README.md b/deployment/monocular/README.md new file mode 100644 index 000000000..e7de36d18 --- /dev/null +++ b/deployment/monocular/README.md @@ -0,0 +1,119 @@ +# Monocular + +[Monocular](https://github.com/helm/monocular) is web-based UI for managing Kubernetes applications packaged as Helm Charts. It allows you to search and discover available charts from multiple repositories, and install them in your cluster with one click. + +## TL;DR; + +```console +$ helm repo add monocular https://helm.github.io/monocular +$ helm install monocular/monocular +``` + +## Introduction + +This chart bootstraps a [Monocular](https://github.com/helm/monocular) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Prerequisites + +### [Nginx Ingress controller](https://github.com/kubernetes/ingress) + +To avoid issues with Cross-Origin Resource Sharing, the Monocular chart sets up an Ingress resource to serve the frontend and the API on the same domain. This is used to route requests made to `:/` to the frontend pods, and `:/api` to the backend pods. + +It is possible to run Monocular on separate domains and without the Nginx Ingress controller, see the [configuration](#serve-monocular-frontend-and-api-on-different-domains) section on how to do this. + +## Installing the Chart + +First, ensure you have added the Monocular chart repository: + +```console +$ helm repo add monocular https://helm.github.io/monocular +``` + +To install the chart with the release name `my-release`: + +```console +$ helm install --name my-release monocular +``` + +The command deploys Monocular on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration + +See the [values](values.yaml) for the full list of configurable values. + +### Disabling Helm releases (deployment) management + +If you want to run Monocular without giving the option to install and manage charts in your cluster, similar to [KubeApps](https://kubeapps.com) you can configure `api.config.releasesEnabled`: + +```console +$ helm install monocular/monocular --set api.config.releasedEnabled=false +``` + +### Configuring chart repositories + +You can configure the chart repositories you want to see in Monocular with the `api.config.repos` value, for example: + +```console +$ cat > custom-repos.yaml << separate-domains.yaml << **NOTE:** If you are deploying Monocular using the [provided Helm chart](deployment.md), refer to the `values.yaml` file to make any configuration modifications. - -### Enable Helm Releases integration - -Monocular adds support to interact with an existing Tiller server in order to: - -* List existing Helm releases. GET `/v1/releases` -* Get information about a Helm release. GET `/v1/releases/:releaseName` -* Deploy a release. POST `/v1/releases` -* Delete a release. DELETE `/v1/releases/:releaseName` - -> **IMPORTANT**: Enabling this feature will allow anybody with access to the running instance to create, list and delete any Helm release existing in your cluster. -> This feature is aimed for internal, behind the firewall deployments of Monocular, please plan accordingly. - -#### Requirements - -* Enable the feature by setting the `releasesEnabled` flag in the configuration file (or values.yaml if using the provided chart) -* If you are running Monocular outside of the k8s cluster, you will need to enable port forwarding -by setting the following flag `tillerPortForward: true`. diff --git a/docs/deployment.md b/docs/deployment.md index d48aaed68..9d75a7089 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -1,116 +1 @@ -# Deploying Monocular in Kubernetes - -## Quickstart - -Monocular is packaged as a Helm Chart that can be found in the `/deployment/monocular` directory. - -> **Prerequisites** -> -> The chart is configured and tested to be used alongside an NGINX Ingress controller. Please be sure that you have a running instance in your cluster before proceeding. More information [here](https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress). - -Install the Monocular chart: - -``` -helm install deployment/monocular -``` - -Visit [Using Helm](https://github.com/kubernetes/helm/blob/master/docs/using_helm.md) to learn more about how to use Helm. - -Once deployed, your application should be available at `https://[nginx-ingress-controller-service-ip]`. - -### Chart details - -The chart contains 3 tiers and one ingress resource. - -#### Components - - * UI: AngularJS web frontend. - * API: Golang based backend API. - * Prerederer: PhantomJS prerenderer for SEO purposes. More information [here](https://github.com/prerender/prerender). - -#### Ingress resource - -The chart includes an ingress resource that is configured to route the backend API via `[your-domain]/api` so it can be easily consumed by the UI avoiding any CORS issue or configuration. - -You can configure many different settings from hosts, ingress-class to tls options using the `values.yaml` file. - -# Configuration - -You can customize settings like the chart repositories to pull from by modifying the `values.yaml` file. Click [here](configuration.md) to learn more. - -# CI/CD scripts - -In the `/deployment` directory you can find a set of convenience scripts helpful in CI/CD setups. - -## Deploy for the first time - -You can deploy a new release of the operations service -using the `deploy_install.sh` script. - -### Arguments - -#### Required - -* `API_TAG`: Image tag to be used on the API tier, it will be appended to API_IMAGE -* `UI_TAG`: Image tag to be used on the API tier. It will be appended to UI_IMAGE - -#### Optional - -* `API_NAME` (default: `gcr.io/helm-ui/monocular-api`) -* `UI_NAME` (default: `gcr.io/helm-ui/monocular-ui`) -* `RELEASE_NAME` (default: `Helm's provided random name`) Helm release - name. -* `VALUES_OVERRIDE` (default: `api.image.repository=${API_IMAGE},api.image.tag=${API_TAG},ui.image.repository=${UI_IMAGE},ui.image.tag=${UI_TAG}`) Helm values to be overridden (`helm install --set $VALUES_OVERRIDE`) -* `HELM_OPTS` (default: no value) Extra options to be passed to the helm - command i.e --dry-run --debug - -### Examples - -``` -# Deploy the release -API_TAG=1 UI_TAG=1 ./deploy_install.sh - -# Deploy setting the release name -API_TAG=1 UI_TAG=1 RELEASE_NAME='my_release' ./deploy_install.sh - -# Deploy with helm debug and dry-run -API_TAG=1 UI_TAG=1 HELM_OPTS="--debug --dry-run" ./deploy_install.sh - -# Deploy overridding default values -API_TAG=1 UI_TAG=1\ - VALUES_OVERRIDE="backend.image.repository=my-image,backend.service.type=LoadBalancer"\ - ./deploy_install.sh -``` - -## Upgrade an existing release - -You can upgrade an existing release of the operations service using the `deploy_upgrade.sh` script. - -### Arguments - -#### Required - -* `API_TAG`: Image tag to be used on the API tier, it will be appended to API_IMAGE -* `UI_TAG`: Image tag to be used on the API tier. It will be appended to UI_IMAGE -* `RELEASE_NAME`: Helm release name. - -#### Optional - -* `API_NAME` (default: `gcr.io/helm-ui/monocular-api`) -* `UI_NAME` (default: `gcr.io/helm-ui/monocular-ui`) -* `SKIP_UPGRADE_CONFIRMATION` (default: false) Skip the confirmation - prompt if an upgrade needs to be performed. Useful for unattended - name. -* `VALUES_OVERRIDE` (default: `api.image.repository=${API_IMAGE},api.image.tag=${API_TAG},ui.image.repository=${UI_IMAGE},ui.image.tag=${UI_TAG}`) Helm values to be overridden (`helm install --set $VALUES_OVERRIDE`) -* `HELM_OPTS` (default: no value) Extra options to be passed to the helm - command i.e --dry-run --debug - -### Examples - -``` -# Upgrade the release in attended mode -API_TAG=1 UI_TAG=1 RELEASE_NAME='my_release' ./deploy_upgrade.sh - -# Upgrade in unattended mode -API_TAG=1 UI_TAG=1 RELEASE_NAME='my-release' SKIP_UPGRADE_CONFIRMATION=true ./deploy_upgrade.sh -``` +See the chart [README](/deployment/monocular/README.md) to learn how to deploy and configure Monocular on your Kubernetes cluster. \ No newline at end of file diff --git a/src/api/config/repos/repos.go b/src/api/config/repos/repos.go index c72c1ed1f..0c7252568 100644 --- a/src/api/config/repos/repos.go +++ b/src/api/config/repos/repos.go @@ -26,13 +26,13 @@ type Repo struct { var official = Repos{ Repo{ Name: "stable", - URL: "http://storage.googleapis.com/kubernetes-charts", + URL: "https://kubernetes-charts.storage.googleapis.com", Source: "https://github.com/kubernetes/charts/tree/master/stable", }, Repo{ Name: "incubator", URL: "http://storage.googleapis.com/kubernetes-charts-incubator", - Source: "https://github.com/kubernetes/charts/tree/master/incubator", + Source: "https://kubernetes-charts-incubator.storage.googleapis.com", }, }