Clone GitOps Repository

In this guide you will clone Arrikto’s GitOps repository inside your management environment to take full control of your deployment in a reproducible manner.

This repository is maintained by Arrikto and provides customers with manifests necessary for their enterprise deployment.

If you have already cloned the GitOps repository, proceed to the Verify section, to make sure your repository is properly configured.

What You’ll Need

Procedure

  1. Start the SSH agent and add your SSH identity:

    root@rok-tools:/# source <(ssh-agent) && ssh-add /root/.ssh/id_rsa
    
    • If the above command fails with

      /root/.ssh/id_rsa: No such file or directory
      

      you should follow the Configure Git guide, to configure your SSH identity.

  2. Create a new directory and go inside it:

    root@rok-tools:/# mkdir -p ~/ops && cd ~/ops
    
  3. Clone the GitOps repository:

    root@rok-tools:~/ops# git clone git@github.com:arrikto/deployments.git deployments
    
    • If the above command fails with

      Permission denied (publickey).
      fatal: Could not read from remote repository.
      
      Please make sure you have the correct access rights
      and the repository exists.
      

      you don’t have access to the Arrikto repository. You should go through the Configure Git guide, to configure your SSH identity.

    • If the above command fails with

      fatal: destination path 'deployments' already exists and is not an empty directory.
      

      it’s possible that you have already cloned the GitOps repository. Go to the Verify section to make sure your repository is properly configured.

  4. Change your current directory to the GitOps directory:

    root@rok-tools:~/ops# cd deployments
    
  5. Checkout the upstream branch:

    root@rok-tools:~/ops/deployments# git checkout release-1.3
    
    • If the above command fails with

      error: pathspec 'release-1.3' did not match any file(s) known to git.
      

      you should fetch the latest updates from the Arrikto remote. You can fetch the latest updates with the following command:

      root@rok-tools:~/ops/deployments# git fetch origin
      

Verify

  1. Change your current directory to the one you cloned the GitOps repository to:

    root@rok-tools:/# cd ~/ops/deployments
    
  2. 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)
    
  3. Verify you can access the Arrikto remote:

    root@rok-tools:~/ops/deployments# git fetch origin
    
  4. Get the current status of your GitOps repository:

    root@rok-tools:~/ops/deployments# git status
    
    1. Verify the local branch you have checked out is release-1.3.

    2. Verify that the local branch is tracking remote branch origin/release-1.3.

    3. Verify your repository is clean:

      nothing to commit, working tree clean
      

Important

Mirror the GitOps repository to a private remote to be able to recover it in any case.

Summary

You have successfully cloned Arrikto’s GitOps repository inside your management environment.

What’s Next

The next step is to create a VPC for your Kubernetes cluster.

Optionally, if you want to add an internal GitHub repository as an additional Git remote to your clone of the GitOps repository, you can follow this guide: