Return to your VSCode application window. It is now time to setup and initialize your GitLab repo.
Ensure you are at the top level directory for your project folder:
Set your Git global settings:
Initialize your local project directory as git repo:
Initialized empty Git repository in /home/pod01/workspace/ndfclab/nac/.git/
Add pointer to your GitLab remote repository.
In Git repos, it is very common to have a hidden file called .gitignore
. This is a reserved filename and it is used to
ignore specific file extensions and/or directories from being added to the Git repo. An example of a specific file you do not want added to your
Git repo is your .python-version
hidden file that specifies your pyenv environment.
Add your current files to your staging area for committing to your GitLab repo.
Check your git status of your working directory and staging area.
The following files are staged for commit. Make sure your list matches the output below!
On branch main No commits yet Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: .gitignore new file: group_vars/ndfc/connection.yml new file: group_vars/ndfc/ndfc.yml new file: host_vars/fabric-external-stage/fabric.nac.yml new file: host_vars/fabric-external-stage/global.nac.yml new file: host_vars/fabric-external-stage/policy.nac.yml new file: host_vars/fabric-external-stage/topology.nac.yml new file: host_vars/fabric-stage/fabric.nac.yml new file: host_vars/fabric-stage/global.nac.yml new file: host_vars/fabric-stage/interfaces_access.nac.yml new file: host_vars/fabric-stage/interfaces_routed.nac.yml new file: host_vars/fabric-stage/interfaces_vpc.nac.yml new file: host_vars/fabric-stage/networks.nac.yml new file: host_vars/fabric-stage/poap.nac.yml new file: host_vars/fabric-stage/policy.nac.yml new file: host_vars/fabric-stage/topology.nac.yml new file: host_vars/fabric-stage/underlay.nac.yml new file: host_vars/fabric-stage/vpc.nac.yml new file: host_vars/fabric-stage/vrf_lite.nac.yml new file: host_vars/fabric-stage/vrfs.nac.yml new file: hosts.stage.yml new file: requirements.txt new file: requirements.yml new file: vxlan.yml
Issue a git commit which is like a save point of your current local repo.
[main (root-commit) bb2a31a] Initial Commit 24 files changed, 453 insertions(+) create mode 100644 .gitignore create mode 100644 group_vars/ndfc/connection.yml create mode 100644 group_vars/ndfc/ndfc.yml create mode 100644 host_vars/fabric-external-stage/fabric.nac.yml create mode 100644 host_vars/fabric-external-stage/global.nac.yml create mode 100644 host_vars/fabric-external-stage/policy.nac.yml create mode 100644 host_vars/fabric-external-stage/topology.nac.yml create mode 100644 host_vars/fabric-stage/fabric.nac.yml create mode 100644 host_vars/fabric-stage/global.nac.yml create mode 100644 host_vars/fabric-stage/interfaces_access.nac.yml create mode 100644 host_vars/fabric-stage/interfaces_routed.nac.yml create mode 100644 host_vars/fabric-stage/interfaces_vpc.nac.yml create mode 100644 host_vars/fabric-stage/networks.nac.yml create mode 100644 host_vars/fabric-stage/poap.nac.yml create mode 100644 host_vars/fabric-stage/policy.nac.yml create mode 100644 host_vars/fabric-stage/topology.nac.yml create mode 100644 host_vars/fabric-stage/underlay.nac.yml create mode 100644 host_vars/fabric-stage/vpc.nac.yml create mode 100644 host_vars/fabric-stage/vrf_lite.nac.yml create mode 100644 host_vars/fabric-stage/vrfs.nac.yml create mode 100644 hosts.stage.yml create mode 100644 requirements.txt create mode 100644 requirements.yml create mode 100644 vxlan.yml
With your local repo added and committed to staging, push your content to your remote GitLab repo.
Enumerating objects: 31, done. Counting objects: 100% (31/31), done. Delta compression using up to 8 threads Compressing objects: 100% (29/29), done. Writing objects: 100% (31/31), 5.64 KiB | 825.00 KiB/s, done. Total 31 (delta 4), reused 0 (delta 0), pack-reused 0 To 10.15.0.159:Pod01_2025_01/LTRDCN-3439.git * [new branch] main -> main Branch 'main' set up to track remote branch 'main' from 'origin'.
In Gitlab, you need to refresh the page to see your repo populated.
Continue to the next section to create your production fabric configuration data model files and get them commited to your repo.