Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 37 additions & 19 deletions docs/vendor/testing-vm-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ This topic describes how to use Replicated Compatibility Matrix to create and ma

## Set Up SSH Access

In order to access VMs that you create with Compatibility Matrix, you need to set up SSH access. You can do this using your personal GitHub account or a GitHub service account used by your team.
In order to access VMs that you create with Compatibility Matrix, you need to set up SSH access. You can do this using a GitHub account or a personal public/private key.

For setting up SSH access to VMs that you create on your local machine, Replicated recommends that you use your personal GitHub account. For setting up SSH access for VMs created in CI/CD workflows used by your team, use a GitHub service account. For more information, see the sections below.
### Use Your GitHub Account

You can set up SSH access using your personal GitHub account or a GitHub service account used by your team. For setting up SSH access to VMs that you create on your local machine, Replicated recommends that you use your personal GitHub account.

For setting up SSH access for VMs created in CI/CD workflows used by your team, use a GitHub service account. For more information, see [Use a GitHub Service Account](#github-service-account) below.

:::note
Your GitHub usernames and SSH keys are synced to a VM when it is first created. If you update your GitHub username or keys after creating a VM, you can manually sync by updating your [Account Settings](https://vendor.replicated.com/account-settings) in the Vendor Portal and clicking **Save**.
:::

### Use Your GitHub Account

To set up and verify SSH access for Compatibility Matrix VMs using your personal GitHub account:

1. Log in to your GitHub account and add an SSH key if you do not have one already. For information about how to generate and add a new SSH key, see [Generate a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generati[…]w-ssh-key) and [Adding a new SSH key to your GitHub account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) in the GitHub documentation.
Expand All @@ -34,6 +36,36 @@ To set up and verify SSH access for Compatibility Matrix VMs using your personal

1. On the **Account Settings > Account Information** page, for **GitHub username**, add your GitHub username.

### Use a GitHub Service Account {#github-service-account}

Use a GitHub service account if you are setting up SSH access for VMs created in CI/CD workflows used by your team.

To automate the creation of VMs in your CI/CD workflows, you can use the flag `--ssh-public-key` to provide the SSH public key for a GitHub service account. For example:

```bash
replicated vm create --distribution ubuntu --version 24.04 --ssh-public-key ~/.ssh/id_rsa.pub
```

Using multiple SSH public keys:

```bash
replicated vm create --distribution ubuntu --version 24.04 --ssh-public-key ~/.ssh/id_rsa.pub --ssh-public-key ~/.ssh/id_ed25519.pub
```

### Use a Personal Public/Private Key

To set up and verify SSH access for Compatibility Matrix VMs using a personal public/private key pair:

1. If you do not already have a public and private key, generate a new public/private key pair.

1. Log in to the Vendor Portal and go to [**Compatibility Matrix Settings**](https://vendor.replicated.com/compatibility-matrix/settings).

1. On the **Compatibility Matrix Settings > SSH Public Keys** page, upload your public key.

### Test Your SSH Access

To test that you SSH access is working:

1. On the command line, authenticate with the Replicated CLI using your Vendor Portal account:

```bash
Expand All @@ -58,20 +90,6 @@ To set up and verify SSH access for Compatibility Matrix VMs using your personal
If you see the prompt `Are you sure you want to continue connecting (yes/no/[fingerprint])?`, type `yes` and press Enter to continue. You might see this prompt if it is the first time you are authenticating with the public/private SSH key in your GitHub account.
:::

### Use a Service Account

To automate the creation of VMs in your CI/CD workflows, you can use the flag `--ssh-public-key` to provide the SSH public key for a GitHub service account. For example:

```bash
replicated vm create --distribution ubuntu --version 24.04 --ssh-public-key ~/.ssh/id_rsa.pub
```

Using multiple SSH public keys:

```bash
replicated vm create --distribution ubuntu --version 24.04 --ssh-public-key ~/.ssh/id_rsa.pub --ssh-public-key ~/.ssh/id_ed25519.pub
```

## Create VMs

### With the Replicated CLI
Expand Down Expand Up @@ -291,4 +309,4 @@ To set the network policy of a VM to `airgap`:
```bash
replicated network update NETWORK_ID --policy airgap
```
Where `NETWORK_ID` is the ID of the network from the output of the `vm ls` command.
Where `NETWORK_ID` is the ID of the network from the output of the `vm ls` command.