Skip to main content

Posts

Showing posts from November, 2021

Continuous Integration with Jenkins and GitLab

  Enter the credential manager Go into system credentials Add a new credential (private key of slave node where you want to run the job) We need a SSH private key credential. I’m not sure the username matters, but I set it to “git” as that is what the login for gitlab uses. I then pointed it to my *private* key on the machine and gave it a description. Now the key shows up in the system. Once I had setup the ssh private key, which allows Jenkins to connect to the git host over ssh (i.e. git clone git@server:user/repo.git), I needed to setup API Access for Jenkins to get metadata from GitLab. In GitLab go to your user profile. Select “Access Tokens”. Now make a new token, I gave it a descriptive name and made it expire at the end of the decade (I haven’t investigated the pros/cons of expiration date length yet). You are then presented with a screen showing the token. Copy it now, as it won’t be accessible again! You can always create a new one if you mess it up t...

Azure VM Snapshot

  Create a VM from a VHD by using the Azure portal Create a snapshot and then create a disk from the snapshot. This strategy allows you to keep the original VHD as a fallback: 1.       From the  Azure portal , on the left menu, select  All services . 2.       In the  All services  search box, enter  disks  and then select  Disks  to display the list of available disks. 3.       Select the disk that you would like to use. The  Disk  page for that disk appears. 4.       From the menu at the top, select  Create snapshot . 5.       Enter a  Name  for the snapshot. 6.       Choose a  Resource group  for the snapshot. You can use either an existing resource group or create a new one. 7.       For  Account type , choose ei...

Attach Disk To Azure VM

This article shows you how to attach both new and existing disks to a Linux virtual machine through the Azure portal. Add a data disk 1.      Sign in to the  Azure portal . 2.      Search for and select  Virtual machines . 3.      Select a virtual machine from the list. 4.      On the  Virtual machine  pane, select  Disks . 5.      On the  Disks  pane, select  Create and attach a new disk . 6.      In the drop-downs for the new disk, make the selections you want, and name the disk. 7.      Select  Save  to create and attach the new data disk to the VM. Attach an existing disk 1. On the Disks pane, under Data disks, select Attach existing disks. 2.        Click the drop-down menu for Disk name and select a disk from the lis...

Azure Web App Service

  App Service Azure App Service  is an HTTP-based service for hosting web applications, REST APIs, and mobile back ends. You can develop in your favorite language, be it .NET, .NET Core, Java, Ruby, Node.js, PHP, or Python. Applications run and scale with ease on both Windows and  Linux -based environments. Here are some key features of App Service: Multiple languages and frameworks  - App Service has first-class support for ASP.NET, ASP.NET Core, Java, Ruby, Node.js, PHP, or Python. Managed production environment  - App Service automatically patches and maintains the OS and language frameworks for you. Containerization and Docker  - Dockerize your app and host a custom Windows or Linux container in App Service. Run multi-container apps with Docker Compose. Migrate your Docker skills directly to App Service. DevOps optimization  - Set up continuous integration and deployment with Azure DevOps, GitHub, BitBucket, Docker Hub, or Azure...

Jenkins

Pre-requisites 1. Install a Webserver https://gitlab.com/Azam-devops/webserver/-/blob/main/README.md Code for index.html https://gitlab.com/Azam-devops/webserver 2. Maven Code https://gitlab.com/Azam-devops/imperial-maven-project 1. Install & configure Jenkins Automation Server on Linux Vm. 2. Go through at some of the important options in Jenkins. 3. Manage Jenkins. 4. Plugins 5. Global Tools Configuration. 6. Credentials 7. Users 8. Slave Nodes 9. Configuring CI pipeline using Gitlab. 10. Configuring standalone CICD pipeline using. 11. Automating the CICD pipeline. 12. Jenkins log 13. Introduction to Jenkins file. 14. Basic groovy syntax & file formation. 15. Launching a Pipeline using Jenkins file. 3. DevOps Architecture Description of above DevOps plan. Create Maven based source code in Gitlab. Create a Jenkins job which will execute below stages. Checkout code from Gitlab Build/compile the source code using Maven as a build tool. scan the code virtually. Test...