Clone GitOps Repository¶
In this guide you will clone the Arrikto GitOps repository inside your management environment to take full control of your deployment in a reproducible manner.
Arrikto maintains this repository and provides customers with manifests necessary for their enterprise deployment.
Fast Forward
If you have already cloned the Arrikto GitOps repository, expand this box to fast-forward.
- Proceed to the Verify section.
Choose one of the following options to clone the Arrikto GitOps repository:
- Option 1: Clone GitOps Repository Automatically (preferred).
- Option 2: Clone GitOps Repository Manually.
Overview
What You'll Need¶
- Configured Git credentials.
Option 1: Clone GitOps Repository Automatically (preferred)¶
Clone the Arrikto GitOps repository by following the on-screen instructions on
the rok-deploy
user interface.
If rok-deploy
is not already running, start it with:
root@rok-tools:~# rok-deploy --run-from clone
Proceed to the Summary section.
Option 2: Clone GitOps Repository Manually¶
If you want to clone the Arrikto GitOps repository manually, follow the instructions below.
Procedure¶
Run
keychain
to start the SSH agent and use your SSH identity:root@rok-tools:~# eval "$(keychain --eval id_rsa)" * keychain 2.8.2 ~ http://www.funtoo.org * Starting ssh-agent... * Adding 1 ssh key(s): /root/.ssh/id_rsa * ssh-add: Identities added: /root/.ssh/id_rsa
Troubleshooting
can't find id_rsa
If the above command shows the following warning message:
Warning: can't find id_rsa; skipping
it means that keychain could not find the file
~/.ssh/id_rsa
, which normally contains your private SSH key.To proceed, follow the Configure Git guide to configure your private SSH key.
Create a new directory and go inside it:
root@rok-tools:~# mkdir -p ~/ops && cd ~/ops
Clone the GitOps repository:
root@rok-tools:~/ops# git clone git@github.com:arrikto/deployments
Air Gapped
Use the URL of the mirrored repository instead, which is accessible from inside your management environment.
Troubleshooting
Permission denied
If the above command fails with the following error message:
Permission denied (publickey)
it means that you do not have access to the Arrikto GitOps repository.
To proceed, follow the Configure Git guide to configure your SSH identity.
destination path 'deployments' already exists
If the above command fails with the following error message:
fatal: destination path 'deployments' already exists and is not an empty directory.
it means that you have already cloned the GitOps repository. You may proceed to the Verify section.
Change your current directory to the GitOps directory:
root@rok-tools:~/ops# cd deployments
Checkout the upstream branch:
root@rok-tools:~/ops/deployments# git checkout release-1.4
Troubleshooting
pathspec 'release-1.4' did not match any file(s) known to git
If the above command fails with the following error message:
error: pathspec 'release-1.4' did not match any file(s) known to git.
it means that the branch
release-1.4
does not exist in your GitOps repository.To proceed, fetch the latest updates from the Arrikto remote and re-run this step. You can fetch the latest updates with the following command:
root@rok-tools:~/ops/deployments# git fetch origin
Verify¶
Go to your GitOps repository, inside your
rok-tools
management environment:root@rok-tools:~# cd ~/ops/deployments
Run
keychain
to start the SSH agent and use your SSH identity:root@rok-tools:~/ops/deployments# eval "$(keychain --eval id_rsa)" * keychain 2.8.2 ~ http://www.funtoo.org * Found existing ssh-agent: 14431 * Known ssh key: /root/.ssh/id_rsa
Troubleshooting
can't find id_rsa
If the above command shows the following warning message:
Warning: can't find id_rsa; skipping
it means that keychain could not find the file
~/.ssh/id_rsa
, which is expected to contain your private SSH key.To proceed, follow the Configure Git guide to configure your private SSH key.
Verify that the Arrikto remote is
origin
and it has the correct URL:root@rok-tools:~/ops/deployments# git remote -v | grep origin origin git@github.com:arrikto/deployments (fetch) origin git@github.com:arrikto/deployments (push)
Verify you can access the Arrikto remote:
root@rok-tools:~/ops/deployments# git fetch origin
Troubleshooting
Permission denied
If the above command fails with the following error message:
Permission denied (publickey)
it means that you do not have access to the Arrikto GitOps repository.
To proceed, follow the Configure Git guide to configure your SSH identity.
Get the current status of your GitOps repository:
root@rok-tools:~/ops/deployments# git status
Verify the local branch you have checked out is
release-1.4
.Verify that the local branch is tracking remote branch
origin/release-1.4
.Verify your repository is clean:
nothing to commit, working tree clean
Summary¶
You have successfully cloned Arrikto's GitOps repository inside your management environment.
What's Next¶
The next step is to configure the CLI tool for your cloud provider in your management environment.
See also
You can add an internal GitHub repository as an additional Git remote to your clone of the Arritko GitOps repository: