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

Transition to docusaurus #317

Merged
merged 53 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
d2bd7b3
Transferred files to tmp folder
satr Feb 8, 2024
fc9d683
Transferred files to public-site folder
satr Feb 8, 2024
e38b343
Fixed name
satr Feb 8, 2024
ea86d20
Fixed name
satr Feb 8, 2024
dbd670b
Fixed name
satr Feb 8, 2024
1b882b4
Corrected config
satr Feb 8, 2024
2fc3567
Added search, changed port
satr Feb 8, 2024
93f9fd3
Updated search
satr Feb 8, 2024
e8d58e7
Re-arranged files
satr Feb 9, 2024
a1ce3c3
Re-arranged files
satr Feb 9, 2024
13726db
Re-arranged files
satr Feb 9, 2024
bf5ea00
Fixed configs
satr Feb 14, 2024
917519e
Fixed styles
satr Feb 14, 2024
43bafe0
Removed outdated files. Fixed main page
satr Feb 15, 2024
a33bc4d
Added team cards
satr Feb 19, 2024
839447b
Fixed community folder. Added Makefile
satr Feb 21, 2024
958771f
Style
satr Feb 21, 2024
27fa352
Style
satr Feb 21, 2024
01dfc3d
Style
satr Feb 22, 2024
5fe2560
Style
satr Feb 22, 2024
2175e29
Style
satr Feb 22, 2024
ebe9c28
Docker ignore
satr Feb 22, 2024
f3b4478
Fixing broken links
satr Feb 22, 2024
807173b
Fixing broken links
satr Feb 23, 2024
31ec66e
Fixing broken links
satr Feb 23, 2024
65e34cd
Restored ext dns info
satr Feb 23, 2024
a9fd3ee
Cleaned cache
satr Feb 23, 2024
0dbf774
Turn off cache
satr Feb 23, 2024
2a016b2
Turn on cache
satr Feb 23, 2024
974e212
Set new npm
satr Feb 23, 2024
a1a83c0
build with acr
satr Feb 23, 2024
91d29b2
Merge remote-tracking branch 'origin/main' into transition-to-docusaurus
satr Feb 23, 2024
79616df
removed demo files
satr Feb 23, 2024
663ed72
Fixed favicon and style. Fixed LInk to radix-concept
satr Feb 26, 2024
ea57f87
Fixed favicon and style. Fixed LInk to radix-concept
satr Feb 26, 2024
ee49b2b
Fixing underline
satr Feb 26, 2024
13a4d5b
Fixing underline
satr Feb 26, 2024
67ba5f7
Added sidebars
satr Feb 26, 2024
7fb1bbf
Added sidebars
satr Feb 26, 2024
aa93c8c
Reduced size of photos
satr Feb 26, 2024
dab6651
Fixed <>
satr Feb 26, 2024
9104faf
Fixed tips
satr Feb 26, 2024
9d01976
Removed web-share
satr Feb 26, 2024
f4dff04
Fixed ref
satr Feb 27, 2024
490a296
Added what's new
satr Feb 27, 2024
955baad
Fixed brocken links
satr Feb 29, 2024
9b8924a
Fixed style
satr Mar 1, 2024
7e6c68d
Fixed style
satr Mar 1, 2024
949faca
Rearranged pages for radix-config, private link and code integration
satr Mar 1, 2024
e7400aa
Rearranged main menu
satr Mar 1, 2024
37b1678
Fixed link
satr Mar 1, 2024
f1970c7
Changed page title
satr Mar 1, 2024
a40eda7
Fixed font
satr Mar 1, 2024
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ build
.jekyll-cache/
.jekyll-metadata
**/.DS_Store
**/node_modules
2 changes: 1 addition & 1 deletion examples/radix-app/docs/workshop.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- markdownlint-disable MD014 MD007 MD034-->
&lt;!-- markdownlint-disable MD014 MD007 MD034--&gt;

# 1. Omnia Radix example application

Expand Down
4 changes: 2 additions & 2 deletions examples/radix-example-oauth-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ To generate a **role**, in the APIs Azure AD app, go to "Manifest" and update th
]
```

To grant a AD user or group a **role**, in the APIs Azure AD app, go to "Overview" and click the link for "Manage application in local directory". This will open Enterprise application overview of the app we're working on. Go to "Users and Groups" -> "Add User" -> select an AD group your part of (e.g. `Radix Playground Users`) and grant it the **role** "Admin".
To grant a AD user or group a **role**, in the APIs Azure AD app, go to "Overview" and click the link for "Manage application in local directory". This will open Enterprise application overview of the app we're working on. Go to "Users and Groups" -&gt; "Add User" -&gt; select an AD group your part of (e.g. `Radix Playground Users`) and grant it the **role** "Admin".

Important: Users who are not part of the AD group you granted the Radix role to, will still be able to authenticate, get a valid access token, and get access to the Client. It's up to the API to authorize based on the **role**. This enable the possibility to limit API calls based on which **role** a user has.

Expand Down Expand Up @@ -93,7 +93,7 @@ You will need to change the value for the `OAUTH2_PROXY_CLIENT_ID`, `OAUTH2_PROX

The two [secrets](https://www.radix.equinor.com/docs/topic-concepts/#secret) that must be configured in the Radix Web Console are `OAUTH2_PROXY_CLIENT_SECRET` and `OAUTH2_PROXY_COOKIE_SECRET`. Note that the **cookie secret** does not need to match the one used locally.

The application should then build and deploy, and it will be availble at `https://<app-name>.app.radix.equinor.com/`. The `auth-proxy` component will be exposed via this endpoint.
The application should then build and deploy, and it will be availble at `https://&lt;app-name&gt;.app.radix.equinor.com/`. The `auth-proxy` component will be exposed via this endpoint.

## Further development

Expand Down
7 changes: 7 additions & 0 deletions public-site/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
README.md
dev.Dockerfile
Dockerfile
docker-compose.yml
.dockerignore
build
20 changes: 20 additions & 0 deletions public-site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
**/node_modules

# Production
**/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
4 changes: 0 additions & 4 deletions public-site/.markdownlint.json

This file was deleted.

8 changes: 5 additions & 3 deletions public-site/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM docker.io/node:21-alpine3.18 as builder
FROM docker.io/node:20.11.1-alpine3.19 as builder

WORKDIR /site
COPY ./docs .
COPY . .
RUN npm install -g [email protected]
RUN npm install
RUN npm run build

FROM docker.io/nginxinc/nginx-unprivileged:1.25.2-alpine
WORKDIR /site
COPY --from=builder /site/src/.vuepress/dist /site
COPY --from=builder /site/build /site
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 8080
USER 101
43 changes: 43 additions & 0 deletions public-site/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.PHONY: lint
lint:
npm run "lint"
npm run "lint-ts"


.PHONY: lint-strict
lint-strict:
npm run "lint-strict"

.PHONY: run
run:
npm run start

.PHONY: build-dist run-dist run-dist-rebuilt

build-dist:
npm run build

run-dist:
npm run serve

run-dist-rebuilt: build-dist run-dist

.PHONY: run-docker-dev
run-docker-dev:
docker compose -f docker-compose.yml up

.PHONY: build-docker
build-docker:
docker build . -t public-site

.PHONY: run-docker
run-docker:
docker run -it -p 8080:8080 public-site

.PHONY: run-docker-rebuilt
run-docker-rebuilt: build-docker run-docker

.PHONY: down
down:
docker compose down

39 changes: 26 additions & 13 deletions public-site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This builds a Docker image `radix-public-site`, runs it in the container
`radix-public-site_container`, mounts the local directory into `/site` in the
container.

You can see the site on <http://localhost:8081>
You can see the site on &lt;http://localhost:8081&gt;

Stop the server with Ctrl+C, but also run `docker-compose down` to clean up the
Docker state.
Expand Down Expand Up @@ -53,19 +53,32 @@ But the interesting bits are the actual content:
- `/references/`: Reference documentation for end-users.
- `/other/`: Documentation not directly related to any specific category.

## CSS
## ducusaurus
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

Vuepress is using [Stylus](https://stylus-lang.com/).
[Create an application](https://docusaurus.io/docs/installation)
```bash
npx create-docusaurus@latest public-site classic --typescript
```

The `/.vuepress/styles/index.styl` file includes all stylesheet files (organised under
`/.vuepress/public/assets/styles/`) as well as style overrides for the Vuepress generator.
## docusaurus development

The `/.vuepress/styles/pallete.styl` file is used to override certain style variables used for by the different Vuepress components. This file should not contain CSS styles.
`npm start`
Starts the development server.

You can read more about Vuepress Styling here:
`npm run build`
Bundles your website into static files for production.

- [index.styl](https://vuepress.vuejs.org/config/#index-styl)
- [palette.styl](https://vuepress.vuejs.org/config/#palette-styl)
`npm run serve`
Serves the built website locally.

`npm run deploy`
Publishes the website to GitHub pages.

We recommend that you begin by typing:

`cd public-site`
`npm start`

## Production build

Expand All @@ -75,10 +88,10 @@ build image locally:
docker build -t radix-public-site-prod .
docker run --name radix-public-site-prod_container --rm -p 8080:8080 radix-public-site-prod

The web server will be available on <http://localhost:8080>
The web server will be available on &lt;http://localhost:8080&gt;

# Credits

trees by Made x Made from the Noun Project: <https://thenounproject.com/term/trees/1723897/>
pot plant by Made x Made from the Noun Project: <https://thenounproject.com/term/pot-plant/1724797/>
Tumbleweed by Megan Sorenson from the Noun Project: <https://thenounproject.com/term/tumbleweed/1390797/>
trees by Made x Made from the Noun Project: &lt;https://thenounproject.com/term/trees/1723897/&gt;
pot plant by Made x Made from the Noun Project: &lt;https://thenounproject.com/term/pot-plant/1724797/&gt;
Tumbleweed by Megan Sorenson from the Noun Project: &lt;https://thenounproject.com/term/tumbleweed/1390797/&gt;
3 changes: 3 additions & 0 deletions public-site/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
6 changes: 3 additions & 3 deletions public-site/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM docker.io/node:21-alpine3.18
FROM docker.io/node:21-alpine3.18 as builder

WORKDIR /site
COPY ./docs/package.json ./docs/package-lock.json /site/
COPY . .
RUN npm install
COPY ./docs .
RUN npm run build

CMD npm run dev
2 changes: 1 addition & 1 deletion public-site/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ services:
networks:
- radix-public-site
ports:
- "8081:8080"
- "8081:3000"

networks:
radix-public-site:
Expand Down
4 changes: 0 additions & 4 deletions public-site/docs/.gitignore

This file was deleted.

36 changes: 36 additions & 0 deletions public-site/docs/community/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Community
---
import RadixTeam from '../../src/components/RadixTeam/index.tsx'

# Community

Radix aims to be _the_ platform to build and deploy code within Equinor. It can only be that if it helps Equinor developers — that's you — succeed.

Of course, Radix is developed and maintained by Equinor developers as well. That means we want to work together to build the best platform we can. If you have problems or suggestions, we want to hear from you! It helps.

:::tip Hello
We are based in Forus Øst in Stavanger. If you see us on the corridor, say hello!
:::

![radix team](/images/Toppbilde2.jpg)

## On Slack

If you'd like to discuss the platform, features or improvements, head on to the main [Omnia Radix channel](https://equinor.slack.com/messages/C8U7XGGAJ). Stuck? App not building? Don't understand the docs? the place to ask is in [the support channel](https://equinor.slack.com/messages/CBKM6N2JY).

Let us together build the Radix community!..

## On GitHub

If you think you found a bug, or you have a concrete proposal, [log an issue](https://github.com/equinor/radix/issues) on GitHub. We have multiple repositories, but all issues are tracked in **radix repo**.

## Release register

New features are publicly announced in the [Omnia Radix Slack channel](https://equinor.slack.com/messages/C8U7XGGAJ), and added to the release register page.

Check out what's new in the [Release register](/docs/docs/topic-releases/index.md)

## The Radix team

<RadixTeam />
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ title: Docs

## Reference

- [The `radixconfig.yaml` file](../references/reference-radix-config/)
- [Private Link](../references/reference-private-link/)
- [The `radixconfig.yaml` file](/docs/references/reference-radix-config/)
- [Private Link](/docs/references/reference-private-link/index.md)
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Other resources could be the official [Docker documentation](https://docs.docker

Application hosted on Radix must be run with non-root privileges in the container. A security policy enabled in the Radix platform will prevent the application from running if it is not configured to run as non-root. Here's an sample on how you can run change a Docker container to run as a non-root user, the principle is that you create a dedicated user and group on the image and use this user to run the process.

> If this is not configured, your deployment will not start.
&gt; If this is not configured, your deployment will not start.

If your base image is a unprivileged image, you'll need to find the ID of the running user, and use that id in your Dockerfile.

**USER <USER_ID>** specifies which user to run as, this **must** be the ID of the user, not the name. This will ensure that Kubernetes can verify that the container is running as a non-root user.
**USER [USER_ID]** specifies which user to run as, this **must** be the ID of the user, not the name. This will ensure that Kubernetes can verify that the container is running as a non-root user.

This is a sample on how it can be done for **node alpine based images**.

Expand All @@ -41,11 +41,11 @@ EXPOSE 8001

The ID of the group and user can be anything in the range 1000-65535.

`groupadd` command follows the syntax `groupadd -S -g <GROUP_ID> <GROUP-NAME>`
`groupadd` command follows the syntax `groupadd -S -g [GROUP_ID] [GROUP-NAME]`

`useradd` command follows the syntax `useradd -S -u <USER_ID> -g <GROUP_NAME> <USER_NAME>`
`useradd` command follows the syntax `useradd -S -u [USER_ID] -g [GROUP_NAME] [USER_NAME]`

> Be aware - [the syntax for add user and group](../../guides/docker-useradd/) can be different for the distribution of images
&gt; Be aware - [the syntax for add user and group](/docs/guides/docker-useradd/) can be different for the distribution of images

There are many great articles on securing docker images. See [Snyk](https://res.cloudinary.com/snyk/image/upload/v1551798390/Docker_Image_Security_Best_Practices_.pdf).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ title: Domain names

# Domain names

There can be several domain names mapped to [application components](../topic-concepts/#component) in Radix. In general you will want to use the [public name](#public-name), but you should understand all options.
There can be several domain names mapped to [application components](/docs/docs/topic-concepts/#component) in Radix. In general you will want to use the [public name](#public-name), but you should understand all options.

> Some domain names include a `clusterEnvNamepace` component. This varies depending on the type of cluster. In Radix there are three **cluster types**; these are the values for `clusterEnvNamepace` in each type
>
> - prod (_blank_)
> - playground (`playground`)
&gt; Some domain names include a `clusterEnvNamepace` component. This varies depending on the type of cluster. In Radix there are three **cluster types**; these are the values for `clusterEnvNamepace` in each type
&gt;
&gt; - prod (_blank_)
&gt; - playground (`playground`)

## Canonical name

Expand Down Expand Up @@ -53,7 +53,7 @@ Examples:
The _app default alias_ is a convenience domain name to make it easier to publish and use your application. It points to a specific component and environment in your application, and allows a reasonable URL to be distributed to end-users without the hassle of setting up [external aliases](#external-alias).

- One per application
- [Defined in `radixconfig.yaml`](../../references/reference-radix-config/#dnsappalias)
- [Defined in `radixconfig.yaml`](/docs/references/reference-radix-config/#dnsappalias)

Examples:

Expand All @@ -65,10 +65,10 @@ Examples:
```text
[appName].[clusterEnvNamepace].radix.equinor.com
```
`dnsAlias` creates one or several DNS aliases in the form of `<alias>.radix.equinor.com` for the specified environment and component. There are few reserved aliases which cannot be used:
`dnsAlias` creates one or several DNS aliases in the form of `&lt;alias&gt;.radix.equinor.com` for the specified environment and component. There are few reserved aliases which cannot be used:

- Difference from App default alias - it does not have `app.` domain before `radix.equinor.com` and there can be multiple aliases per application, per environment, per component
- [Defined in `radixconfig.yaml`](../../references/reference-radix-config/#dnsalias)
- [Defined in `radixconfig.yaml`](/docs/references/reference-radix-config/#dnsalias)

Examples:

Expand All @@ -81,10 +81,10 @@ Examples:
[whatever]
```

For ultimate customisation of your domain names, you can "bring your own" domain into Radix with an _external alias_. There is a [detailed guide](../../guides/external-alias/) on how to configure this.
For ultimate customisation of your domain names, you can "bring your own" domain into Radix with an _external alias_. There is a [detailed guide](/docs/guides/external-alias/) on how to configure this.

- Multiple allowed per component
- [Defined in `radixconfig.yaml`](../../references/reference-radix-config/#dnsexternalalias)
- [Defined in `radixconfig.yaml`](/docs/references/reference-radix-config/#dnsexternalalias)
- Requires external DNS alias management
- Requires custom TLS certificate

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Adding Dynatrace as your monitoring tool can be done by adding the Dynatrace age

This method adds DynaTrace OneAgent to the container, and uses RadixConfig to manipulate environment.

::: tip TLDR
:::tip TLDR
- Always use pre-production image in dockerfile.
- Add `spa-equinor.kanari.com` to `privateImageHubs` in your `radixconfig.yaml` file.
- Override `DT_TENANT`, `DT_TENANTTOKEN` and `DT_CONNECTION_POINT` with Radix Secrets.
Expand Down Expand Up @@ -39,7 +39,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS PRODUCTION
COPY --from=DYNATRACE / /
ENV DT_TENANT eddaec99-38b1-4a9c-9f4c-9148921efa10 # Defaults to PRE-PRODUCTION, can be changed in RadixConfig for Prod
ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so
ENV DT_TAGS DT_MZ=<TeamMzName> # Set yor app name here
ENV DT_TAGS DT_MZ=&lt;TeamMzName&gt; # Set yor app name here

#Application config
WORKDIR /app
Expand Down Expand Up @@ -83,9 +83,9 @@ spec:
After changing your `radixconfig.yaml` file and pushing the changes, you must log in to your Application Configuration page in [Radix Console](https://console.radix.equinor.com) and paste in the PaaS-Token in **Private image hubs** under **App Secrets**.
Then you must update environment secrets in each component with corresponding Dynatrace configuration: `DT_TENANT`, `DT_TENANTTOKEN` (`tenantToken`) and `DT_CONNECTION_POINT` (`formattedCommunicationEndpoints`).
```request
GET https://spa-equinor.kanari.com/e/<DT_TENANT>/api/v1/deployment/installer/agent/connectioninfo
GET https://spa-equinor.kanari.com/e/&lt;DT_TENANT&gt;/api/v1/deployment/installer/agent/connectioninfo
accept: application/json
Authorization: Api-Token <Paas Token>
Authorization: Api-Token &lt;Paas Token&gt;
```

- Read about Dynatrace Container monitoring integration [here](https://statoilsrm.sharepoint.com/sites/applicationperformancemanagement/SitePages/Container-monitoring---attaching-to-a-management-zone.aspx)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ You can view the log for each step in a pipeline job by clicking on the step nam

## Radix CLI

[Radix CLI](../topic-radix-cli/) provides access to component and job logs by using the `rx get log` command.
[Radix CLI](/docs/docs/topic-radix-cli/) provides access to component and job logs by using the `rx get log` command.

For components, only logs for active replicas can be read, and for jobs the log from the last run, as long as Kubernetes has not garbage collected the log resources.

Loading
Loading