Skip to content

Commit

Permalink
chore(examples): use local.demo.garden for local kubernetes examples
Browse files Browse the repository at this point in the history
  • Loading branch information
twelvemo authored and vvagaytsev committed Apr 20, 2023
1 parent 8810d97 commit d49d660
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/kubernetes/local/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export async function configureProvider(params: ConfigureProviderParams<LocalKub
}

if (!config.defaultHostname) {
config.defaultHostname = `${projectName}.local.app.garden`
config.defaultHostname = `${projectName}.local.demo.garden`
}

return { config }
Expand Down
2 changes: 1 addition & 1 deletion core/test/data/test-projects/helm-local-mode/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environments:
- name: local
defaultNamespace: local-mode-helm-default
variables:
baseHostname: ${project.name}.local.app.garden
baseHostname: ${project.name}.local.demo.garden
- name: remote
defaultNamespace: local-mode-helm-${var.userId}
variables:
Expand Down
2 changes: 1 addition & 1 deletion core/test/data/test-projects/helm/api/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ values:
ingress:
enabled: true
paths: [/]
hosts: [api.local.app.garden]
hosts: [api.local.demo.garden]
8 changes: 4 additions & 4 deletions core/test/integ/src/plugins/kubernetes/helm/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe("Helm common functions", () => {
app.kubernetes.io/managed-by: Helm
spec:
rules:
- host: "api.local.app.garden"
- host: "api.local.demo.garden"
http:
paths:
- path: /
Expand All @@ -162,7 +162,7 @@ describe("Helm common functions", () => {
app.kubernetes.io/managed-by: Helm
spec:
rules:
- host: "api.local.app.garden"
- host: "api.local.demo.garden"
http:
paths:
- path: /
Expand Down Expand Up @@ -289,7 +289,7 @@ ${expectedIngressOutput}
spec: {
rules: [
{
host: "api.local.app.garden",
host: "api.local.demo.garden",
http: {
paths: [
{
Expand Down Expand Up @@ -327,7 +327,7 @@ ${expectedIngressOutput}
spec: {
rules: [
{
host: "api.local.app.garden",
host: "api.local.demo.garden",
http: {
paths: [
{
Expand Down
2 changes: 1 addition & 1 deletion core/test/integ/src/plugins/kubernetes/helm/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe("configureHelmModule", () => {
ingress: {
enabled: true,
paths: ["/"],
hosts: ["api.local.app.garden"],
hosts: ["api.local.demo.garden"],
},
},
valueFiles: [],
Expand Down
2 changes: 1 addition & 1 deletion core/test/unit/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const testProvider = () => {
detail: {},
ingresses: [
{
hostname: "service-a.test-project-b.local.app.garden",
hostname: "service-a.test-project-b.local.demo.garden",
path: "/path-a",
port: 80,
protocol: "http",
Expand Down
10 changes: 5 additions & 5 deletions docs/basics/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ And finally deploy the project with Garden in sync mode:
garden deploy --sync
```

You should now be able to visit the example project at [http://vote.local.app.garden](http://vote.local.app.garden).
You should now be able to visit the example project at [http://vote.local.demo.garden](http://vote.local.demo.garden).

If the page doesn't load because the DNS address can't be found, you'll need to go to step 4 and update your hostfile. Otherwise, you're done!

Expand All @@ -152,7 +152,7 @@ The project itself doubles as an interactive guide that walks you through some c
## Step 4 — Update hostfile (only if needed)

{% hint style="info" %}
The `*.local.app.garden` domain resolves to 127.0.0.1 via our DNS provider. This means that when you go to [http://vote.local.app.garden](http://vote.local.app.garden), you _should_ be redirected to the app that you have running locally. However, some routers will prevent redirects to 127.0.0.1 and you'll need to update your hostfile instead.
The `*.local.demo.garden` domain resolves to 127.0.0.1 via our DNS provider. This means that when you go to [http://vote.local.demo.garden](http://vote.local.demo.garden), you _should_ be redirected to the app that you have running locally. However, some routers will prevent redirects to 127.0.0.1 and you'll need to update your hostfile instead.
{% endhint %}

If you get an error saying that DNS address can't be found when attempting to load the page, follow the instructions below to edit the hostfile for your platform.
Expand All @@ -171,7 +171,7 @@ We're using vim here but feel free to use your editor of choice.
Then add the following to file and save it:

```sh
127.0.0.1 vote.local.app.garden
127.0.0.1 vote.local.demo.garden
```

{% endtab %}
Expand All @@ -184,14 +184,14 @@ From Notepad, open the `hosts` file in the `C:\Windows\System32\Drivers\etc` dir
Then add the following to the file and save it:

```sh
127.0.0.1 vote.local.app.garden
127.0.0.1 vote.local.demo.garden
```

{% endtab %}

{% endtabs %}

Now you should be able to load the quickstart example project in your browser at [http://vote.local.app.garden](http://vote.local.app.garden).
Now you should be able to load the quickstart example project in your browser at [http://vote.local.demo.garden](http://vote.local.demo.garden).

## Next Steps

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ you need to set the `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment varia
```sh
export HTTP_PROXY=http://localhost:9999 # <- Replace with your proxy address.
export HTTPS_PROXY=$HTTP_PROXY # <- Replace if you use a separate proxy for HTTPS.
export NO_PROXY=local.app.garden,localhost,127.0.0.1 # <- This is important! See below.
export NO_PROXY=local.demo.garden,localhost,127.0.0.1 # <- This is important! See below.
```

The `NO_PROXY` variable should include any other hostnames you might use for local development, since you likely
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/migrating-from-docker-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ name: compose2garden
environments:
- name: default
variables:
base-hostname: compose2garden.local.app.garden
base-hostname: compose2garden.local.demo.garden

providers:
- name: local-kubernetes
Expand Down Expand Up @@ -70,7 +70,7 @@ services:
- mongo
```

This one is a `Module` instead of a `Project`. Under `sync`, we set up syncing from the root folder to our built `app` folder so we can see code changes live when in developer mode. Under `ports`, we specify the same port as in our Docker Compose file (3000). We set up a health check for the the `/api` route, as that is what this module serves, and an ingress on a subdomain. In our case, this will let us access our backend service on `compose2garden.local.app.garden`. Finally, we specify the dependency on the `mongo` module, which we will define in a bit.
This one is a `Module` instead of a `Project`. Under `sync`, we set up syncing from the root folder to our built `app` folder so we can see code changes live when in developer mode. Under `ports`, we specify the same port as in our Docker Compose file (3000). We set up a health check for the the `/api` route, as that is what this module serves, and an ingress on a subdomain. In our case, this will let us access our backend service on `compose2garden.local.demo.garden`. Finally, we specify the dependency on the `mongo` module, which we will define in a bit.

### The `frontend/frontend.garden.yml` file

Expand Down
2 changes: 1 addition & 1 deletion docs/k8s-plugins/action-types/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ values:
ingress:
enabled: true
paths: [/]
hosts: [result-helm.local.app.garden]
hosts: [result-helm.local.demo.garden]
tests:
- name: integ
args: [echo, ok]
Expand Down
4 changes: 2 additions & 2 deletions docs/misc/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ No, you have to use the [`kubernetes`](../reference/module-types/kubernetes.md)

We're exploring how we can release it incrementally. Please let us know if this is something you're interested in.

### How does Garden resolve the `*.local.app.garden` domain?
### How does Garden resolve the `*.local.demo.garden` domain?

The `*.local.app.garden` domain resolves to 127.0.0.1 via our DNS provider for convenience. If you want to use a different hostname for local development, you’ll have to add the corresponding entry to your hosts file.
The `*.local.demo.garden` domain resolves to 127.0.0.1 via our DNS provider for convenience. If you want to use a different hostname for local development, you’ll have to add the corresponding entry to your hosts file.

### Does garden support bi-directional syncing?

Expand Down
2 changes: 1 addition & 1 deletion docs/using-garden/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If you specify a `port` for a given service, other services from inside the clus

If you specify an `ingress`, your can reach your service from outside the cluster. For example with `curl` or in a browser.

The default ingress for local development is `http://demo-project.local.app.garden/<ingress-name>`. You can override this by setting a `hostname` under the `ingress` directive.
The default ingress for local development is `http://demo-project.local.demo.garden/<ingress-name>`. You can override this by setting a `hostname` under the `ingress` directive.

## Services in the Stack Graph

Expand Down
2 changes: 1 addition & 1 deletion examples/argocd/project.garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ variables:
environments:
- name: local
variables:
baseHostname: vote.local.app.garden
baseHostname: vote.local.demo.garden
- name: gke-gitops-dev
defaultNamespace: ${var.dev-k8s-namespace}
variables:
Expand Down
2 changes: 1 addition & 1 deletion examples/gatsby-code-sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ garden deploy --sync

This tells Garden to reload the files into the container, without re-building and re-deploying.

Now, open `http://gatsby-sync.local.app.garden/` in your browser, and then try changing some of the website code. For example, open [src/pages/index.js](src/pages/index.js) and change the text in the `h1` tag. You'll notice the page updates immediately in the browser!
Now, open `http://gatsby-sync.local.demo.garden/` in your browser, and then try changing some of the website code. For example, open [src/pages/index.js](src/pages/index.js) and change the text in the `h1` tag. You'll notice the page updates immediately in the browser!

## Notes

Expand Down
2 changes: 1 addition & 1 deletion examples/local-mode-helm/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: local-mode-helm
environments:
- name: local
variables:
baseHostname: vote.local.app.garden
baseHostname: vote.local.demo.garden
providers:
- name: local-kubernetes
defaultHostname: ${var.baseHostname}
Expand Down
2 changes: 1 addition & 1 deletion examples/local-mode-k8s/backend/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ spec:
spec:
ingressClassName: nginx
rules:
- host: local-mode.local.app.garden
- host: local-mode.local.demo.garden
http:
paths:
- path: /hello-backend
Expand Down
2 changes: 1 addition & 1 deletion examples/remote-sources/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ sources:
environments:
- name: local
variables:
baseHostname: vote.local.app.garden
baseHostname: vote.local.demo.garden
- name: testing
variables:
baseHostname: ${project.name}-testing-${var.userId}.dev-1.sys.garden
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/garden.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
kind: Project
name: rust-example
variables:
base-hostname: rust.local.app.garden
base-hostname: rust.local.demo.garden

environments:
- name: dev
Expand Down
2 changes: 1 addition & 1 deletion examples/vote-helm/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: vote-helm
environments:
- name: local
variables:
baseHostname: vote.local.app.garden
baseHostname: vote.local.demo.garden
- name: testing
defaultNamespace: ${var.userId}
variables:
Expand Down
4 changes: 2 additions & 2 deletions examples/vote-helm/result-image/views/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ var socket = io.connect({
transports:['polling'],
// path: "/result/views/socket.io",
});
// https://vote-helm.local.app.garden/socket.io/?EIO=3&transport=polling&t=1544105126936-2
// https://vote-helm.local.app.garden/result/views/socket.io/?EIO=3&transport=polling&t=1544104159102-166
// https://vote-helm.local.demo.garden/socket.io/?EIO=3&transport=polling&t=1544105126936-2
// https://vote-helm.local.demo.garden/result/views/socket.io/?EIO=3&transport=polling&t=1544104159102-166

var bg1 = document.getElementById('background-stats-1');
var bg2 = document.getElementById('background-stats-2');
Expand Down
6 changes: 3 additions & 3 deletions examples/vote/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ garden deploy

**Note:** If you're running _minikube_, you may need to add the appropriate entries to your `/etc/hosts` file.
Find the IP for your local cluster by running `minikube ip` and add an entry with that IP for each of
`vote.vote.local.app.garden`, `result.vote.local.app.garden` and `api.vote.local.app.garden`.
`vote.vote.local.demo.garden`, `result.vote.local.demo.garden` and `api.vote.local.demo.garden`.
This is not necessary when using Docker for Desktop, because your cluster will then be exposed directly on _localhost_.

### To Vote

The voting UI is at http://vote.vote.local.app.garden/. Open a browser tab, and try voting a few times.
The voting UI is at http://vote.vote.local.demo.garden/. Open a browser tab, and try voting a few times.

### View Results

In a separate tab, open http://result.vote.local.app.garden. The results there will reflect in real-time your voting.
In a separate tab, open http://result.vote.local.demo.garden. The results there will reflect in real-time your voting.

### Try out code synchronization

Expand Down
2 changes: 1 addition & 1 deletion examples/vote/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: vote
environments:
- name: local
variables:
baseHostname: vote.local.app.garden
baseHostname: vote.local.demo.garden
- name: remote
variables:
baseHostname: ${project.name}-testing-${var.userId}.dev-1.sys.garden
Expand Down
4 changes: 2 additions & 2 deletions examples/vote/result/views/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ var socket = io.connect({
transports:['polling'],
// path: "/result/views/socket.io",
});
// https://vote.local.app.garden/socket.io/?EIO=3&transport=polling&t=1544105126936-2
// https://vote.local.app.garden/result/views/socket.io/?EIO=3&transport=polling&t=1544104159102-166
// https://vote.local.demo.garden/socket.io/?EIO=3&transport=polling&t=1544105126936-2
// https://vote.local.demo.garden/result/views/socket.io/?EIO=3&transport=polling&t=1544104159102-166

var bg1 = document.getElementById('background-stats-1');
var bg2 = document.getElementById('background-stats-2');
Expand Down
2 changes: 1 addition & 1 deletion markdown-link-check-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"timeout": "120s",
"ignorePatterns": [
{
"pattern": "local.app.garden",
"pattern": "local.demo.garden",
"reason": "Ignore example URL"
},
{
Expand Down

0 comments on commit d49d660

Please sign in to comment.