Simple documentation about the most rudimentary tasks
In this Lab we did all work needed to be done in the git repository for you. Still it might make sense to have an idea of what git is and how it works. To work with git you need a rudimentary understanding of what git does and how it works. Git is a very powerful and flexible revision control system. There are many different ways to work with git and different locations of code.
The most simple way to work with git is to have a
- origin repository residing on github.com
- a cloned local copy to work with You will edit changes on the local files, commit them to the local repository and push this new version to the origin repository. You could also edit in the webgui of github.com directly.
Ansible Tower will pull the repository content from github.com so needs to be connected to it as well.
For a simple guide please visit: http://rogerdudler.github.io/git-guide/
You can use a graphical interface like Microsoft Visual Code or work on cmd line. In both cases the workflow is the same, which is why you should know them. The following image illustrates how pull and push get newest data and send changed data to the main repository and how Ansible Controller (aka Tower) can make use of this.
this is best done in github webfrontend
* login to github
* locate this repository
* click on "fork"
This creates a local copy of the repository for local development
git clone https://github.com/<your_git_login>/hpe_oneview_workshop
cd <your_repository_name>
vi <some file>
add .
or
add <some file>
This persists your changes into a "new version"
git commit -m "<some information on what you changed>"
This pushes your new version to your original repository
git push
Sometimes the original repository has changed from elsewhere and you first need to pull these changes before you can push your own.
git pull
In very rare cases this will not work and you need to merge. This should not happen when you are the only one working on your repo.
Sometimes you want to know what your original source is:
git remote -v