Skip to content

Commit

Permalink
Adds tabs for podman/docker docs and OS differences (redhat-developer…
Browse files Browse the repository at this point in the history
…#6115)

* Adds tabs for mac / windows / linux environments in docs

<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Dev:-odo-Dev-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Dev:-Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/Pull-Requests:-Review-guideline

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Documentation:-Contributing
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind feature
/kind cleanup
/kind tests

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->

/kind documentation

**What does this PR do / why we need it:**
* Updates the documentation with regards to different operating systems
  when deploying an image

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes redhat-developer#6085

* Update docs/website/docs/user-guides/deploy/_prerequisites.mdx

Co-authored-by: Armel Soro <armel@rm3l.org>

Co-authored-by: Armel Soro <armel@rm3l.org>
  • Loading branch information
2 people authored and valaparthvi committed Sep 15, 2022
1 parent d7c91ff commit ee25841
Showing 1 changed file with 74 additions and 7 deletions.
81 changes: 74 additions & 7 deletions docs/website/docs/user-guides/deploy/_prerequisites.mdx
Original file line number Diff line number Diff line change
@@ -1,24 +1,91 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

**Prerequisites:**

Before we begin, you must login to a container registry that we will be pushing our application to.
In order to use `odo deploy` you must be able to build an image as well as push to a registry.

#### Step 1. Login to your container registry

Login to a container registry that you will be pushing your application to:

<Tabs
defaultValue="podman"
values={[
{label: 'Podman', value: 'podman'},
{label: 'Docker', value: 'docker'},
]}>

Login to your container registry with either `podman` or `docker`:
<TabItem value="podman">

```console
podman login
```
Or

```console
$ podman login quay.io
Username:
Password:
Login Succeeded!
```

</TabItem>

<TabItem value="docker">

```console
docker login
```

In order for `odo deploy` to push your image, your container registry needs to be accessible.
```console
$ docker login docker.io
Username:
Password:
Login Succeeded!
```

</TabItem>

</Tabs>

#### Step 2. Set the appropriate container build platform

Your container image build must match the same architecture as the cluster you are deploying to.

**NOTE for MacOS:** If you are running Apple Silicon (M1/M2), you must set your Docker build platform to the cluster you are deploying to.
For example: you will have to cross-build a AMD64 image on a Mac M1 (ARM64) in order to deploy to a AMD64 cluster.

For example, if you are deploying to `linux/amd64`:
Choose your deployment architecture:

<Tabs
defaultValue="linuxamd64"
values={[
{label: 'Linux (AMD64)', value: 'linuxamd64'},
{label: 'Linux (ARM)', value: 'linuxarm64'},
{label: 'Windows (AMD64)', value: 'windowsamd64'},
]}>

<TabItem value="linuxamd64">

```console
export DOCKER_DEFAULT_PLATFORM=linux/amd64
```
```

</TabItem>

<TabItem value="linuxarm64">

```console
export DOCKER_DEFAULT_PLATFORM=linux/arm64
```

</TabItem>

<TabItem value="windowsamd64">

```console
export DOCKER_DEFAULT_PLATFORM=windows/amd64
```

</TabItem>

</Tabs>

0 comments on commit ee25841

Please sign in to comment.