Mirror Arrikto GitOps Repository

This guide will walk you through mirroring your local clone of the Arrikto GitOps repository to your internal Git repository inside your self-hosted Git server.

What You’ll Need

Choose one of the following options, based on who will host your internal Git repository.

Procedure

Choose one of the following options, based on who will host your internal Git repository.

  1. Go inside the local repository from inside your bastion host:

    user@bastion:~$ cd deployments
  2. Add a remote for your internal repository:

    user@bastion:~/deployments$ git remote add internal <YOUR_REPO_URL>

    Replace <YOUR_REPO_URL> with the URL of your internal Git repository.

  3. Mirror the repository:

    user@bastion:~/deployments$ git push --mirror internal
  1. Go inside the local repository from inside your bastion host:

    user@bastion:~$ cd deployments
  2. Add rok-tools as remote:

    user@bastion:~/deployments$ git remote add rok-tools rok-tools:/root/deployments
  3. Create an SSH helper script under ~/ssh-rok-tools.

    Choose one of the following options, based on where you have created your management environment.

    #!/bin/sh shift kubectl exec -i rok-tools-0 -- sh -c "$@"
    #!/bin/sh shift docker exec -i rok-tools sh -c "$@"
    #!/bin/sh shift docker exec -i rok-tools sh -c "$@"
  4. Mirror the repository:

    user@bastion:~/deployments$ GIT_SSH_VARIANT=simple GIT_SSH=~/ssh-rok-tools git push --mirror rok-tools

Summary

You have successfully mirrored the Arrikto GitOps repository to an internal, self-hosted Git server.

What’s Next

You may now go back and proceed with configuring Git inside your management environment.