Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDX] Migration to gatsby-plugin-mdx v4 with fix for onCreatePage trigger issue #4583

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
GATSBY_GRAPHQL_IDE=playground
GATSBY_DEV_AMENDED=false
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GATSBY_DEV_AMENDED=false
25 changes: 24 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,28 @@ module.exports = {
"space-infix-ops": [
"error"
]
}
},
"overrides": [
{
"files": ["*.mdx", "*.md"],
"extends": ["plugin:mdx/recommended"],
"settings": {
"mdx/code-blocks": true,
"mdx/language-mapper": {},
},
"rules": {
//these eslint rule exceptions allow for checklint to run and lint mdx files are compatible with MDXv2, and not error out due to react/eslint rules
"semi": 0,
"indent": 0,
"no-trailing-spaces": 0,
"object-curly-spacing": 0,
"space-infix-ops": 0,
"no-irregular-whitespace": 0,
"no-unused-expressions": 0,
"linebreak-style": 0,
"react/jsx-no-undef": 0,
"no-unused-vars": 0,
}
}
],
};
234 changes: 218 additions & 16 deletions CONTRIBUTING.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ videos: 3
lectures: 8
cardImage: "../../../src/assets/images/service-mesh-icons/istio-white.svg"
meshesYouLearn:
[
{
imagepath: "../../../src/assets/images/service-mesh-icons/istio.svg",
name: "Istio",
},
{
imagepath: "../../../src/assets/images/service-mesh-icons/linkerd.webp",
name: "Linkerd",
}
]
- imagepath: "../../../src/assets/images/service-mesh-icons/istio.svg"
name: "Istio"
- imagepath: "../../../src/assets/images/service-mesh-icons/linkerd.webp"
name: "Linkerd"
toc:
[
'getting-started',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lectures: 12
order: 8
---

import { ChapterStyle } from "../../../../src/components/Learn-Components/Chapters-Style/chapters.style.js";


<ChapterStyle>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lectures: 12
order: 2
---

import { ChapterStyle } from "../../../../src/components/Learn-Components/Chapters-Style/chapters.style.js";

import BookInfoOffMesh from "../../../../src/assets/images/learn-layer5/istio/bookinfo-off-mesh.webp";
import BookInfoOnMesh from "../../../../src/assets/images/learn-layer5/istio/bookinfo-on-mesh.webp";

Expand Down Expand Up @@ -61,7 +61,7 @@ If your environment **does NOT** supports either of these two APIs, then you may
As part of Istio deployment in [Previous chapter](./getting-started), you have deployed the sidecar injector.

<br />
<h2 class="chapter-sub-heading">
<h2 className="chapter-sub-heading">
<a name="auto"></a> Deploying Sample App with Automatic sidecar injection
</h2>

Expand Down Expand Up @@ -107,7 +107,7 @@ This will do 3 things:
1. Deploys all the BookInfo services in the `default` namespace.
1. Deploys the virtual service and gateway needed to expose the BookInfo's productpage application in the `default` namespace.

<h3 class="chapter-sub-heading">
<h3 className="chapter-sub-heading">
<a name="verify"></a> Verify Bookinfo deployment{" "}
</h3>

Expand Down Expand Up @@ -139,7 +139,7 @@ Follow this if the above steps did not work for you
<br />
<br />

<h4 class="chapter-alt-heading"> Label namespace for injection</h4>
<h4 className="chapter-alt-heading"> Label namespace for injection</h4>

Label the default namespace with istio-injection=enabled

Expand All @@ -161,7 +161,7 @@ kube-public Active 1h
kube-system Active 1h
```

<h4 class="chapter-alt-heading"> Deploy BookInfo</h4>
<h4 className="chapter-alt-heading"> Deploy BookInfo</h4>
<br />

Applying this yaml file included in the Istio package you collected in [Getting Started](./getting-started) will deploy the BookInfo app in you cluster.
Expand All @@ -170,7 +170,7 @@ Applying this yaml file included in the Istio package you collected in [Getting
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
```

<h4 class="chapter-alt-heading">
<h4 className="chapter-alt-heading">
Deploy Gateway and Virtual Service for BookInfo app
</h4>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ lectures: 12
order: 3
---

import { ChapterStyle } from "../../../../src/components/Learn-Components/Chapters-Style/chapters.style.js";


<ChapterStyle>
The components deployed on the service mesh by default are not exposed outside the cluster. An Ingress Gateway is deployed as a Kubernetes service of type LoadBalancer (or NodePort). To make Bookinfo accessible external to the cluster, you have to create an `Istio Gateway` for the Bookinfo application and also define an `Istio VirtualService` with the routes we need.

<br />
<br />

<h2 class="chapter-sub-heading"> Inspecting the Istio Ingress Gateway</h2>
<h2 className="chapter-sub-heading"> Inspecting the Istio Ingress Gateway</h2>

<br />
The ingress gateway gets exposed as a normal Kubernetes service of type LoadBalancer
Expand Down Expand Up @@ -63,10 +63,10 @@ Now let us find the ingress pod and output the log:
kubectl logs istio-ingressgateway-... -n istio-system
```

<h2 class="chapter-sub-heading">View Istio Ingress Gateway for Bookinfo</h2>
<h2 className="chapter-sub-heading">View Istio Ingress Gateway for Bookinfo</h2>
<br />

<h3 class="chapter-sub-heading"> View the Gateway and VirtualServices</h3>
<h3 className="chapter-sub-heading"> View the Gateway and VirtualServices</h3>

Check the created `Istio Gateway` and `Istio VirtualService` to see the changes deployed:

Expand All @@ -78,7 +78,7 @@ kubectl get virtualservices
kubectl get virtualservices -o yaml
```

<h3 class="chapter-sub-heading">
<h3 className="chapter-sub-heading">
Find the external port of the Istio Ingress Gateway by running:
</h3>

Expand All @@ -92,7 +92,7 @@ To just get the first port of istio-ingressgateway service, we can run this:
kubectl get service istio-ingressgateway -n istio-system --template='{{(index .spec.ports 1).nodePort}}'
```

<h3 class="chapter-sub-heading"> Create a DNS entry:</h3>
<h3 className="chapter-sub-heading"> Create a DNS entry:</h3>

Modify your local `/etc/hosts` file to add an entry for your sample application.

Expand All @@ -108,7 +108,7 @@ echo "http://$(kubectl get nodes --selector=kubernetes.io/role!=master -o jsonpa

Docker Desktop users please use `http://localhost/productpage` to access product page in your browser.

<h2 class="chapter-sub-heading"> Apply default destination rules</h2>
<h2 className="chapter-sub-heading"> Apply default destination rules</h2>

Before we start playing with Istio's traffic management capabilities we need to define the available versions of the deployed services. They are called subsets, in destination rules.

Expand Down Expand Up @@ -189,16 +189,16 @@ kubectl get destinationrules
kubectl get destinationrules -o yaml
```

<h2 class="chapter-sub-heading"> Browse to BookInfo</h2>
<h2 className="chapter-sub-heading"> Browse to BookInfo</h2>

Browse to the website of the Bookinfo. To view the product page, you will have to append
`/productpage` to the url.

<h3 class="chapter-sub-heading"> Reload Page</h3>
<h3 className="chapter-sub-heading"> Reload Page</h3>

Now, reload the page multiple times and notice how it round robins between v1, v2 and v3 of the reviews service.

<h2 class="chapter-sub-heading">
<h2 className="chapter-sub-heading">
Inspect the Istio proxy of the productpage pod
</h2>

Expand Down Expand Up @@ -232,15 +232,15 @@ Follow this if the above steps did not work for you
<br />
<br />

<h4 class="chapter-alt-heading"> Default destination rules</h4>
<h4 className="chapter-alt-heading"> Default destination rules</h4>

Run the following command to create default destination rules for the Bookinfo services:

```sh
kubectl apply -f samples/bookinfo/networking/destination-rule-all-mtls.yaml
```

<h4 class="chapter-alt-heading">
<h4 className="chapter-alt-heading">
Configure the Bookinfo route with the Istio Ingress gateway
</h4>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ lectures: 12
order: 1
---

import { ChapterStyle } from "../../../../src/components/Learn-Components/Chapters-Style/chapters.style.js";

import InstallIstio from "../../../../src/assets/images/learn-layer5/istio/install-istio.webp";
import IstioAdapter from "../../../../src/assets/images/learn-layer5/istio/istio-adapter.webp";

<ChapterStyle>

<h2 class="chapter-sub-heading">Setup Istio </h2>
<h2 className="chapter-sub-heading">Setup Istio </h2>

Now that we have a Kubernetes cluster and Meshery, we are ready to download and deploy Istio resources.

<h2 class="chapter-sub-heading">Steps</h2>
<h2 className="chapter-sub-heading">Steps</h2>

1. [Install Istio](#1)
1. [Verify install](#2)
Expand All @@ -28,7 +28,7 @@ Optional (manual install of Istio):
1. [Setup `istioctl`](#1.2)
1. [Install istio](#1.3)

<h3 class="chapter-sub-heading">
<h3 className="chapter-sub-heading">
<a name="1">Install Istio</a>
</h3>

Expand All @@ -53,7 +53,7 @@ Perform the below steps if the above steps doesn't work for you.
<br />
<br />

<h4 class="chapter-alt-heading">
<h4 className="chapter-alt-heading">
<a name="1.1">Download Istio</a>
</h4>

Expand All @@ -67,7 +67,7 @@ On your local machine, execute:
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.7.3 sh -
```

<h4 class="chapter-alt-heading">
<h4 className="chapter-alt-heading">
<a name="1.2">Setting up istioctl</a>
</h4>

Expand Down Expand Up @@ -96,7 +96,7 @@ Check if the cluster is ready for installation:
istioctl verify-install
```

<h4 class="chapter-alt-heading">
<h4 className="chapter-alt-heading">
<a name="1.3">Install Istio</a>
</h4>

Expand All @@ -112,7 +112,7 @@ Alternatively, with Envoy logging enabled:
istioctl install --set profile=demo --set meshConfig.accessLogFile=/dev/stdout
```

<h3 class="chapter-sub-heading">
<h3 className="chapter-sub-heading">
<a name="2">Verify install</a>
</h3>

Expand All @@ -121,7 +121,7 @@ In the Istio management page:
1. Click the (+) icon on the `Validate Service Mesh Configuration` card.
1. Select `Verify Installation` to verify the installation of Istio.

<h4 class="chapter-alt-heading">Alternatively:</h4>
<h4 className="chapter-alt-heading">Alternatively:</h4>

Istio is deployed in a separate Kubernetes namespace `istio-system`. To check if Istio is deployed, and also, to see all the pieces that are deployed, execute the following:

Expand Down
Loading
Loading