From 4dacbdc4e65e7621fb06fb36219940e23d16882c Mon Sep 17 00:00:00 2001 From: alonit Date: Thu, 21 Sep 2023 23:38:44 +0300 Subject: [PATCH] initial commit --- README.md | 8 ------ tutorials/jenkins_setup.md | 26 +++++++++++++++++- tutorials/onboarding.md | 55 -------------------------------------- 3 files changed, 25 insertions(+), 64 deletions(-) delete mode 100644 tutorials/onboarding.md diff --git a/README.md b/README.md index ffd7d71..b26aced 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,5 @@ # Continuous Integration and Continuous Deployment -## Course onboarding - -Please complete the [onboarding tutorial](tutorials/onboarding.md) for the next class. - -## Course Staff - -**Teacher**: Alon Itach - +972524848860 - ## Course schedule | Date | Hours (india time) | Topic | diff --git a/tutorials/jenkins_setup.md b/tutorials/jenkins_setup.md index d0696a3..406d157 100644 --- a/tutorials/jenkins_setup.md +++ b/tutorials/jenkins_setup.md @@ -40,11 +40,35 @@ When a webhook is configured, GitHub will send a HTTP POST request to a specifie 1. If you don't have it yet, create a new GitHub repository and copy the files under the `roberta` directory to the root directory of your repo, push it. 2. To set up a webhook from GitHub to the Jenkins server, on your GitHub repository page, go to **Settings**. From there, click **Webhooks**, then **Add webhook**. -3. In the **Payload URL** field, type `http://:8080/github-webhook/`. In the **Content type** select: `application/json` and leave the **Secret** field empty. +3. In the **Payload URL** field, type `http://:8080/github-webhook/` (if you run the Jenkins server locally, please read the note below). In the **Content type** select: `application/json` and leave the **Secret** field empty. 4. Choose the following events to be sent in the webhook: 1. Pushes 2. Pull requests +#### Note for students running their Jenkins server locally + +As your Jenkins server is being running locally, it is not accessible over the internet. +This creates a communication challenge between GitHub and your Jenkins server, since GitHub has to notify Jenkins when events occur in the repo. + +[Ngrok](https://ngrok.com/) can solve this problem by creating a secure tunnel between the local machine (where the Jenkins is running) and a public URL provided by Ngrok. +It exposes the local server to the internet, allowing GitHub servers to reach the webhook URL and send updates to Jenkins. + +Sign-up for the Ngrok service (or any another tunneling service to your choice), then install the `ngrok` agent as [described here](https://ngrok.com/docs/getting-started/#step-2-install-the-ngrok-agent). + +Authenticate your ngrok agent. You only have to do this once: + +```bash +ngrok config add-authtoken +``` + +Since the Jenkins service is listening on port `8080`, start ngrok by running the following command: + +```bash +ngrok http 8080 +``` + +Your Jenkins public URL is the URL specified in the `Forwarding` line (e.g. `https://16ae-2a06-c701-4501-3a00-ecce-30e9-3e61-3069.ngrok-free.app`). + ## Managing Jenkins Most standard administrative tasks can be performed from the screens in the **Manage Jenkins** section of the dashboard. diff --git a/tutorials/onboarding.md b/tutorials/onboarding.md deleted file mode 100644 index fe7f4c8..0000000 --- a/tutorials/onboarding.md +++ /dev/null @@ -1,55 +0,0 @@ -# Course Onboarding - -## GitHub - -Create [GitHub account](https://github.com/) if you don't have one yet. - -## Linux setup - -First, you have to have access to Linux operating system (OS). Throughout the course we will use **Ubuntu**, which is a common [distribution of Linux](https://en.wikipedia.org/wiki/Linux_distribution). -We recommend using either version **20.04** or **22.04**. -Please make sure you install it for the next class, so we can start smoothly. - -Below you'll find various ways to install Ubuntu. - - -### Virtualized Ubuntu using VirtualBox - -A common way to set up Ubuntu is to install it on a virtual machine (VM), on top of your existed Windows installation, using VirtualBox. - -VM requirements: - -- At least 8GB of RAM -- At least 50GB disk space - -Follow the below tutorial: -https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox - -In addition, enable clipboard sharing between your Windows and the Ubuntu VM: -https://linuxhint.com/enable-copy-paste-virtualbox-host/ - - -### Native Ubuntu - -Another recommended way is to install Ubuntu Desktop as the primary OS on your laptop or PC. -You can choose to install the Linux next to an existing Windows OS, or instead of it (in such case you may miss some Windows software, like Office, that are no longer supported in Linux). - -To install Ubuntu as your primary OS: -https://ubuntu.com/tutorials/install-ubuntu-desktop - - -To install Ubuntu along with your existed Windows: -https://www.freecodecamp.org/news/how-to-dual-boot-windows-10-and-ubuntu-linux-dual-booting-tutorial/ - - -## Python environment - -Throughout the course, we'll be working with Python version >=3.8. -Please install the below list on your Ubuntu. - -- **Git**: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git. -- **PyCharm Community**: https://www.jetbrains.com/pycharm/download/#section=linux (scroll down for community version). -- **Python Virtual Environment** (to be configured in PyCharm): https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html. - - -Don't know Python? Start TODAY, **don't wait**!!!