Building our profile module

We wrote some code that defined our Jenkins server in the form of a profile at the beginning of this chapter. First, let's inspect the directory structure that we're working with for our already existing code:

profile/
└── manifests
└── jenkins.pp

This is a pretty bare minimum profiles module, with a single manifest. We'll turn this simple module into a Git repository first:

[rary@workstation ~]# cd profile/
[rary@workstation profile]# git init
Initialized empty Git repository in ~/profile/.git/

If we run git status, we'll see that the manifests directory is checked in. Every file in this repository right now is new, so we'll need to add each file and check them into our first commit, often called the 'initial commit':

[rary@workstation profile]# git add -A
[rary@workstation profile]# git commit -m 'initial commit'
[master (root-commit) 64f24a1] initial commit
1 file changed, 19 insertions(+)
create mode 100644 manifests/jenkins.pp
[root@pe-puppet-master profile]# git status
# On branch master
nothing to commit, working directory clean

We're then ready to send off our initial commit to the remote repository:

[rary@workstation profile]# git remote add origin [email protected]:RARYates/cicd-walkthrough-profile.git
[rary@workstation profile]# git push origin master
Counting objects: 4, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 519 bytes | 0 bytes/s, done.
Total 4 (delta 0), reused 0 (delta 0)
To [email protected]:RARYates/cicd-walkthrough-profile.git
* [new branch] master -> master
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.71.6