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.
Overview
What You’ll Need¶
Choose one of the following options, based on who will host your internal Git repository.
- Access to the internal Git server.
- An existing internal Git repository.
- A local clone of the Arrikto GitOps repository.
- An existing management environment.
- An existing internal Git repository.
- A local clone of the Arrikto GitOps repository.
Procedure¶
Choose one of the following options, based on who will host your internal Git repository.
Go inside the local repository from inside your bastion host:
user@bastion:~$ cd deploymentsAdd 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.Mirror the repository:
user@bastion:~/deployments$ git push --mirror internal
Go inside the local repository from inside your bastion host:
user@bastion:~$ cd deploymentsAdd rok-tools as remote:
user@bastion:~/deployments$ git remote add rok-tools rok-tools:/root/deploymentsCreate 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 "$@"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.