Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Lesson on automating with CICD or Jenkins #153

Open
dgjnpr opened this issue Jan 15, 2019 · 8 comments
Open

Lesson on automating with CICD or Jenkins #153

dgjnpr opened this issue Jan 15, 2019 · 8 comments

Comments

@dgjnpr
Copy link

dgjnpr commented Jan 15, 2019

Hi,

I propose a CICD 3 stage lesson using Gitlab. This could be done with Git{Hub,Lab} + Jenkins but that requires additional plumbing and explaining (i.e. how the plumbing works).

  1. Explain the setup - git repo of Ansible that applies a config, gitlab-ci conf
  2. Create a branch, make config changes, use "--dryrun" in MR to test
  3. How to review MR, approve and clear source branch, optionally update tag/version number

This is a more practical "how do I do CICD for networking". Prereqs are Ansible and it's "--dryrun" feature, basic git.

--
Cheeers
Dg

@Mierdin
Copy link
Member

Mierdin commented Jan 15, 2019

See #151 - you guys may want to collaborate. Could maybe use two lessons, but one of you focus on Gitlab, and the other dive deeper into Jenkins? Up to you.

FYI, I started looking into expanding the existing Git lesson with a Gitlab container. You can still have a separate lesson (which I think it's a good idea since you're going well beyond Git basics) but just FYI since everything in Antidote needs to be self-contained (i.e. no Github)

@ntwrkguru
Copy link

I propose a CICD 3 stage lesson using Gitlab. This could be done with Git{Hub,Lab} + Jenkins but that requires additional plumbing and explaining (i.e. how the plumbing works).

I disagree slightly. For the purposes of a lesson, the student doesn't need to know the plumbing. There's essentially no difference between a Jenkinsfile and a .gitlab-ci.yml file. An operator will either have this infrastructure already or need to build it, but we don't need to teach infra plumbing IMO.

That being said, I would prefer Jenkins as the CI/CD engine, mainly because it's the standard and works with either Gitlab or Github (or Bitbucket or whatever). I'm not opposed to also demonstrating Gitlab CI, but I think the priority should be on Jenkins.

@ntwrkguru
Copy link

ntwrkguru commented Jan 16, 2019

Forked @dgjnpr and @abhichau and propose lesson-32. Not sure how we avoid conflicts @Mierdin?

Also, in thinking about this...the SCM doesn't matter at all. Since Gitlab is an absolute resource hog, I would propose a simpler (and smaller) SCM, like GOGS, which offers a Github-like interface, and is much lighter than Gitlab.

@Mierdin
Copy link
Member

Mierdin commented Jan 16, 2019

Not sure how we avoid conflicts @Mierdin?

Can you clarify? Conflicts with what? In case you're referring to the lesson ID, don't worry about it. I'll make sure it's unique before it's merged in the unlikely event it isn't already.

By the way, even though you all are working on similar lesson ideas, it doesn't mean you all have to build the same lesson. Just figure it would be worth coordinating so you can tackle topics the way you want without stepping on each others toes. That might mean you all build different labs in the same lesson (if your content focuses on the same general concepts), or it might not. That's up to you to plan out

Since Gitlab is an absolute resource hog, I would propose a simpler (and smaller) SCM, like GOGS, which offers a Github-like interface, and is much lighter than Gitlab.

Keep in mind we're running network devices 😄 so resource demands are fairly high already. I definitely appreciate keeping it light where it makes sense, as long as it doesn't detract from the learning experience by teaching something that's totally different from what the user might see in the real world. GOGS looks pretty slick and Github-like as you mention, so just make sure in the content/guides you do a good job of mapping GOGS concepts to Github concepts, because let's face it, that's where this knowledge is likely to get applied.

@ntwrkguru
Copy link

I agree @Mierdin. We've used GOGS for a customer solution before, so I'm confident that it's sufficient and won't detract.

@Mierdin
Copy link
Member

Mierdin commented Jan 16, 2019

@ntwrkguru By the way, I created nre-learning/antidote-core#53 to add lesson ID uniqueness checks to the syringe command-line tool. Shortly after the next release I'll follow up with https://github.com/nre-learning/antidote/issues/158 and get it added to CI. That way you know in your PRs that your lesson ID is unique.

@Mierdin
Copy link
Member

Mierdin commented Feb 10, 2019

Hey @ntwrkguru and @dgjnpr, any progress on this one? Anything I can do to help?

@ntwrkguru
Copy link

ntwrkguru commented Feb 11, 2019 via email

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants