<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Osinachi</title>
    <description>The latest articles on Forem by Osinachi (@osinachiuro).</description>
    <link>https://forem.com/osinachiuro</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F623504%2Fdcd5703f-d99b-497d-a631-4db0689de63e.JPG</url>
      <title>Forem: Osinachi</title>
      <link>https://forem.com/osinachiuro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/osinachiuro"/>
    <language>en</language>
    <item>
      <title>Implement Admin SDK Directory API for Google Workspace Management</title>
      <dc:creator>Osinachi</dc:creator>
      <pubDate>Thu, 13 Feb 2025 13:06:11 +0000</pubDate>
      <link>https://forem.com/osinachiuro/implement-admin-sdk-directory-api-for-google-workspace-management-37nd</link>
      <guid>https://forem.com/osinachiuro/implement-admin-sdk-directory-api-for-google-workspace-management-37nd</guid>
      <description>&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;This article demonstrates how to programmatically manage Google Workspace administration using &lt;a href="https://developers.google.com/admin-sdk/directory/reference/rest" rel="noopener noreferrer"&gt;Google Workspace Directory API&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Admin SDK Directory API allows enterprise domain administrators to view and manage their organization's users, groups, devices, and resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;To Develop on Google Workspace particularly using the Admin SDK API the following has to be set up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Google Cloud Project Account&lt;/li&gt;
&lt;li&gt;Enable the Admin SDK API&lt;/li&gt;
&lt;li&gt;An IAM Service account is created, and the JSON key downloaded&lt;/li&gt;
&lt;li&gt;Google Workspace Super Admin Login&lt;/li&gt;
&lt;li&gt;Python 3 Installed&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Implementation Steps
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1
&lt;/h3&gt;

&lt;p&gt;Create a GCP Cloud Project and Enable the Admin SDK API &lt;a href="https://developers.google.com/workspace/guides/create-project" rel="noopener noreferrer"&gt;Reference Article&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fck91dl4delavsmem1fcc.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fck91dl4delavsmem1fcc.JPG" alt="Enable Google Admin SDK API" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2
&lt;/h3&gt;

&lt;p&gt;Create a service account from your Google Cloud console, IAM, and download the key. &lt;a href="https://cloud.google.com/iam/docs/service-accounts-create" rel="noopener noreferrer"&gt;Reference article&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff7vir369k7gcg9lcsfha.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff7vir369k7gcg9lcsfha.JPG" alt="GCP Service account created" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3
&lt;/h3&gt;

&lt;p&gt;Login into Google Workspace as a Super Admin and set up Domain-wide delegation:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7rxnxj0n7t1eoi8n9gd.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7rxnxj0n7t1eoi8n9gd.JPG" alt="Google Workspace Domain-wide delegation" width="800" height="537"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From your &lt;strong&gt;Google Workspace admin console → Security → Access and data control → API controls → Manage Domain-Wide Delegation → Add new&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add Client ID from the Service Account Key you downloaded earlier&lt;/li&gt;
&lt;li&gt;Add required OAuth Scopes, for user and group creation the following scopes are required:

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.googleapis.com/auth/admin.directory.user" rel="noopener noreferrer"&gt;https://www.googleapis.com/auth/admin.directory.user&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.googleapis.com/auth/admin.directory.group" rel="noopener noreferrer"&gt;https://www.googleapis.com/auth/admin.directory.group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Click &lt;strong&gt;Authorize&lt;/strong&gt;
&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 4
&lt;/h3&gt;

&lt;p&gt;Run the following command to install Google API Client Library. &lt;br&gt;
&lt;code&gt;pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 5
&lt;/h3&gt;

&lt;p&gt;Create a Python script to manage users. The sample script below creates a new user in Google Workspace.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from googleapiclient.discovery import build
from google.oauth2 import service_account

# Load the service account credentials
SERVICE_ACCOUNT_FILE = "./path/to/your/service/account/key.json"
SCOPES = ["https://www.googleapis.com/auth/admin.directory.user"]

# Authenticate and build the API client
credentials = service_account.Credentials.from_service_account_file(
    SERVICE_ACCOUNT_FILE, scopes=SCOPES)

# Set up admin API client
admin_email = "super-admin-email@example.com"
delegated_credentials = credentials.with_subject(admin_email)
service = build("admin", "directory_v1", credentials=delegated_credentials)

user_info = {
    "name": {
        "givenName": "Test",
        "familyName": "Doe"
    },
    "password": "SecurePass123!",
    "primaryEmail": "testdoe@example.com"
}

# Create the user
service.users().insert(body=user_info).execute()
print("User Created Successfully!")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 6
&lt;/h3&gt;

&lt;p&gt;Save and run the above script using the command below&lt;/p&gt;

&lt;p&gt;&lt;code&gt;python file_name.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2q3f9unfsqixjb1uxvle.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2q3f9unfsqixjb1uxvle.JPG" alt="Run python script" width="264" height="56"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If everything is set up correctly, the user will be created successfully on the workspace admin console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5bs9gmttik9fq0zy0e8k.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5bs9gmttik9fq0zy0e8k.JPG" alt="Google worspace user created using Directory API" width="800" height="47"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you've found this article useful.&lt;/p&gt;

</description>
      <category>directoryapi</category>
      <category>googleworkspace</category>
      <category>adminsdk</category>
      <category>pythonscripting</category>
    </item>
    <item>
      <title>How to set up Jenkins on an EC2 Instance using BashScript</title>
      <dc:creator>Osinachi</dc:creator>
      <pubDate>Thu, 25 May 2023 18:55:30 +0000</pubDate>
      <link>https://forem.com/osinachiuro/how-to-set-up-jenkins-on-an-ec2-instance-using-bashscript-4mgj</link>
      <guid>https://forem.com/osinachiuro/how-to-set-up-jenkins-on-an-ec2-instance-using-bashscript-4mgj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.jenkins.io/" rel="noopener noreferrer"&gt;Jenkins&lt;/a&gt; is the leading open source development and operations automation server, it provides hundreds of plugins to support building, deploying and automating any project. As a DevOps Engineer, Jenkins has become a necessary tool for Continuous Integration and Deployment, CI/CD.&lt;br&gt;
There are different ways to install and configure a Jenkins server, in this article, I will demonstrate how to get a Jenkins server up and running on an Amazon EC2 Instance using a simple bash script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Basic understanding of Bash scripting&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Account with access to the Console and a basic knowledge of how to launch an EC2 instance&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lets get started! 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Go to the EC2 dashboard on AWS Console and launch an instance.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Give your instance a name eg. jenkins-server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select an ubuntu server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create or select an existing keypair&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a security group for your instance allowing ssh access on Port 22 and also TCP access on Port 8080 which is the port Jenkins listens on&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scroll down to Advanced details and add the script below to the user data field&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Launch Instance &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It will take a while before you get the 2/2 checks passed because of the installations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fbzlx9t89jtk91bktee.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fbzlx9t89jtk91bktee.PNG" alt="Image description" width="800" height="55"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

# install Java

apt update -y
apt install openjdk-11-jdk -y
apt update -y

# Import the GPG key

curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc &amp;gt; /dev/null

# Add the Jenkins software repository to the source list and provide the authentication key

echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list &amp;gt; /dev/null

# install jenkins
apt update -y
apt install jenkins -y
systemctl enable jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Check if Jenkins was installed successfully.&lt;/strong&gt;&lt;br&gt;
There are two ways you can confirm that Jenkins was successfully installed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A. Connect to the server via ssh and run a status check&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;From AWS Console, choose to connect to the server via ssh&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3fbuegk2e1oyeymhgleg.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3fbuegk2e1oyeymhgleg.PNG" alt="Image description" width="800" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open any command line tool, change into the directory where the instance's keypair is located. My keypair is called jen.pem located in my download folder.&lt;/li&gt;
&lt;li&gt;Change the file permission by running &lt;code&gt;chmod 400 jen.pem&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Connect to the server via ssh by running the next code, replace the .pem file name and the server IP.
&lt;code&gt;ssh -i "jen.pem" ubuntu@ec2-34-201-67-199.compute-1.amazonaws.com&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6fi6tdgsfp2eqq8ygmxj.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6fi6tdgsfp2eqq8ygmxj.PNG" alt="Image description" width="800" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you've successfully connected, run the following command:
&lt;code&gt;sudo systemctl status jenkins&lt;/code&gt; and you should get a Jenkins active status.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxnzzeqbhn23pvdul6l76.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxnzzeqbhn23pvdul6l76.PNG" alt="Image description" width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B. Open the server IP on a web browser&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the public IP address of the server and paste on a browser and add Jenkins Port 8080. &lt;code&gt;34.201.67.199:8080&lt;/code&gt; then launch and you should connect to a Jenkins page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy2geta4j4k2quoqpgt2q.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy2geta4j4k2quoqpgt2q.PNG" alt="Image description" width="800" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your Jenkins server is ready for use! 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Things to Note&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Scripts entered as user data are run as the root user, so do not use the sudo command in the script.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Also, because the script is not run interactively, you cannot include commands that require user feedback (such as apt update without the -y flag).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.jenkins.io/doc/book/installing/linux/#debianubuntu" rel="noopener noreferrer"&gt;Jenkins Official Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html?icmpid=docs_ec2_console#user-data-shell-scripts" rel="noopener noreferrer"&gt;AWS Documentation&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>jenkins</category>
      <category>bashscript</category>
      <category>cicd</category>
      <category>devops</category>
    </item>
    <item>
      <title>How to Setup Ubuntu 20.04 LTS on your local windows machine using Vagrant</title>
      <dc:creator>Osinachi</dc:creator>
      <pubDate>Thu, 04 May 2023 10:14:32 +0000</pubDate>
      <link>https://forem.com/osinachiuro/how-to-setup-ubuntu-2004-lts-on-your-local-windows-machine-using-vagrant-3dme</link>
      <guid>https://forem.com/osinachiuro/how-to-setup-ubuntu-2004-lts-on-your-local-windows-machine-using-vagrant-3dme</guid>
      <description>&lt;p&gt;You have a windows computer, however you need to run some resources on a Linux operating system (OS) while still maintaining your windows machine, this is where system virtualization comes in. In this  article, we will loo at how to set up Ubuntu (one of the many Linux OS distributions) on a local windows system without interrupting anything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A host machine (your physical hardware also called bare metal) which is your Laptop or desktop running on a windows operating system with at least an 8GB RAM size.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outline&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install VirtualBox&lt;/li&gt;
&lt;li&gt;Install Vagrant&lt;/li&gt;
&lt;li&gt;Setup Vagrant Box&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's get started.&lt;/p&gt;

&lt;h4&gt;
  
  
  A. Download and Install VirtualBox
&lt;/h4&gt;

&lt;p&gt;A virtualization software is required, this is where the Linux OS will be installed. There are a few virtualization software. Most cloud service providers make use of virtualization software to spin up the virtual machines we purchase to host resources on. For this purpose, I will be using VirtualBox (VBox). &lt;/p&gt;

&lt;p&gt;Go to &lt;a href="https://www.virtualbox.org/wiki/Downloads" rel="noopener noreferrer"&gt;Virtual Box&lt;/a&gt; to download VirtualBox for windows hosts and complete the installation following the guided GUI.&lt;/p&gt;

&lt;p&gt;On completion, a VBox shortcut icon will be created on your desktop by default except you choose not to.&lt;/p&gt;




&lt;h4&gt;
  
  
  B. Create a new Ubuntu machine from the installed virtual box.
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; New Linux machine named 'AltSchool' (name yours as you wish) with version Ubuntu 64-bit.                                                                                                      &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189770731-437afbf6-1723-41f4-b13a-4bad2486628f.PNG" class="article-body-image-wrapper"&gt;&lt;img alt="Capture 1" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189770731-437afbf6-1723-41f4-b13a-4bad2486628f.PNG" width="740" height="729"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; Allocate memory, here I allocated 4GB memory &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189770805-39e68bdb-02d3-4f71-9b3c-b5eadcf2020a.PNG" class="article-body-image-wrapper"&gt;&lt;img alt="Capture 2" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189770805-39e68bdb-02d3-4f71-9b3c-b5eadcf2020a.PNG" width="629" height="616"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; Create a virtual hard disk with 12GB recommended size&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189771688-3c305004-007b-4025-8bfa-f3e25a3a52b9.PNG" class="article-body-image-wrapper"&gt;&lt;img alt="Capture 3" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189771688-3c305004-007b-4025-8bfa-f3e25a3a52b9.PNG" width="624" height="615"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt; My hard disk file type is VirtualBox Disk Image&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189771810-60316494-1f9a-4c07-9a94-4a5bd0f11670.PNG" class="article-body-image-wrapper"&gt;&lt;img alt="Capture 4" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189771810-60316494-1f9a-4c07-9a94-4a5bd0f11670.PNG" width="652" height="720"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.&lt;/strong&gt; Dynamic storage allocated on physical hard disk&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189771881-b6ea94de-1fcb-4fc8-be4e-ba8da7425b17.PNG" class="article-body-image-wrapper"&gt;&lt;img alt="Capture 5" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189771881-b6ea94de-1fcb-4fc8-be4e-ba8da7425b17.PNG" width="643" height="721"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.&lt;/strong&gt;  My AltSchool Virtual Machine created! 💃&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189771952-2dff46d8-615d-47c2-9fa9-cd13762380f5.PNG" class="article-body-image-wrapper"&gt;&lt;img alt="Capture 6" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189771952-2dff46d8-615d-47c2-9fa9-cd13762380f5.PNG" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  C. SETUP UBUNTU 20.04 LTS ON YOUR LOCAL MACHINE USING VAGRANT
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; Vagrant is an open-source software developed by Hashicorp. It enables the creation and configuration of lightweight, reproducible, and portable development environments. It is designed for anyone to have access to a simple and fast way to create a virtualized environment.&lt;/p&gt;

&lt;p&gt;Download Vagrant from &lt;a href="https://www.vagrantup.com" rel="noopener noreferrer"&gt;Vagrant Up&lt;/a&gt; and install it following the default installation prompt. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189772175-d1d5341a-a716-482c-9ae3-9c2793883363.PNG" class="article-body-image-wrapper"&gt;&lt;img alt="Capture-1" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189772175-d1d5341a-a716-482c-9ae3-9c2793883363.PNG" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; Find a virtual machine image from &lt;a href="https://app.vagrantup.com/boxes/search" rel="noopener noreferrer"&gt;Vagrant&lt;/a&gt; called boxes in this case an Ubuntu 20.04 LTS (Focal64) and take note of the name. There are other Ubuntu images available. You can select any you find suitable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189772521-656a1bc3-8df3-4f43-808f-939e85652f44.PNG" class="article-body-image-wrapper"&gt;&lt;img alt="vagrant box -focal" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189772521-656a1bc3-8df3-4f43-808f-939e85652f44.PNG" width="800" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; Create a folder where you want your Ubuntu image initialized.&lt;br&gt;
Switch to a terminal (I used PowerShell in this case) and change into the directory. Then to initialize ubuntu, run the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vagrant init ubuntu/focal64
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This action creates a Vagrantfile in the current folder, you can run &lt;code&gt;ls&lt;/code&gt; to confirm.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you chose an image different from Ubuntu 20.04 LTS, kindly change focal64 to the exact name of your preferred Vagrant box name&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189772994-8f195292-807f-47db-8701-86c0df02694f.PNG" class="article-body-image-wrapper"&gt;&lt;img alt="Capture 2" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189772994-8f195292-807f-47db-8701-86c0df02694f.PNG" width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4&lt;/strong&gt; Run the next command which looks for the necessary configuration files for creating the virtual machine or downloads it if not found.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vagrant up
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189773311-fdd22deb-446b-4f18-b730-ee48d9ff5dde.PNG" class="article-body-image-wrapper"&gt;&lt;img alt="Capture 3" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189773311-fdd22deb-446b-4f18-b730-ee48d9ff5dde.PNG" width="800" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5&lt;/strong&gt; Then next command lets us access or log in to the ubuntu machine. When complete, your machine will be ready for use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vagrant ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189773375-36fd39e2-7fef-4d11-8ec2-0639688c730d.PNG" class="article-body-image-wrapper"&gt;&lt;img alt="Capture 4" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F83463641%2F189773375-36fd39e2-7fef-4d11-8ec2-0639688c730d.PNG" width="800" height="488"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Thanks for reading my article, feel free to drop a comment to share your experience with this method. 😊&lt;/p&gt;

</description>
      <category>linux</category>
      <category>vagrant</category>
      <category>virtualbox</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
