Are you a developer working on Microsoft’s cloud platforms like Azure? Then, you should read this post. Microsoft has released a new open-source Linux project, ‘CBL-Mariner’, an internal Linux distribution for Microsoft’s cloud infrastructure as part of an open-source initiative. Well, this is not the first initiative project by Microsoft. It has contributed its investments in developing various Linux-based technologies, such as SONiC, Azure Sphere OS, and Windows Subsystem for Linux (WSL). Now, you might want to know where should I download the CBL-Mariner ISO file. Microsoft didn’t release a bootable ISO file for the public. You have to build a CBL-Mariner ISO Image on your own. Let’s explore how to build a CBL-Mariner ISO Image in this demo.
Table of Contents
What Is CBL-Mariner?
Let’s clear the concept, CBL-Mariner is an open-source internal Linux distribution developed for Microsoft’s cloud infrastructure and edge products and services. It is not the OS developed for end-users like Ubuntu, Debian, and Mint Linux distributions. It is designed to provide a consistent platform for cloud services. Visit this git page to read more about CBL-Mariner.
Prerequisites To Build CBL-Mariner ISO Image:
Microsoft didn’t release installable files like its ISO, VHDX, or VMDK. We will show you how to build ISO images on your own and also share pre-built ISO images to make you more convenient. We are going to build a CBL-Mariner ISO image on Ubuntu Linux for demonstration purposes. Let’s quickly install the required packages on the Ubuntu on which we are going to build the CBL-Mariner ISO file.
Packages Required to Build CBL-Mariner ISO file:
- Ubuntu Linux or any popular distribution.
- Go Language
- Docker Engine
- make
- tar
- wget
- curl
- rpm
- qemu-utils
- golang-1.15-go
- genisoimage
- python-minimal
- bison
- gawk
- git
Time needed: 4 hours.
How to Build CBL-Mariner ISO Image?
- Run this command to add a backports repo to install the necessary version of Go on Ubuntu:
- $ sudo add-apt-repository ppa:longsleep/golang-backports
$ sudo apt-get update - Run this command to install make, tar, wget, curl, rpm, qemu-utils, golang-1.15-go, genisoimage, python-minimal3.8, bison, and gawk packages on Ubuntu:
$ sudo apt -y install make tar wget curl rpm qemu-utils golang-1.15-go genisoimage python-minimal bison gawk
- Run this command to install pigz on Ubuntu. This is an optional package to install. It is recommended but not required to have:
$ sudo apt -y install pigz
- Create soft link of go inside user’s bin directory to fix go 1.15 link:
$ sudo ln -vsf /usr/lib/go-1.15/bin/go /usr/bin/go
- Run these commands to install the Docker engine on Ubuntu
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
$ sudo usermod -aG docker $USERNote: Log out and Log in to save the changes to the user.
- Install git on Ubuntu if not installed:
$ sudo apt install git
- Clone CBL-Mariner to your local disk:
$ git clone https://github.com/microsoft/CBL-Mariner.git
- Check out the desired release branch. Sync to the latest stable build.
$ git checkout 1.0-stable
- Change your directory to CBL-Mariner/toolkit/ and build ISO bootable image using this command:
$ cd CBL-Mariner/toolkit/
$ sudo make iso REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/full.jsonNote: This process may take 1 to 2 Hrs. Wait to complete the process.
Tutorial
- Run this command to add a backports repo to install the necessary version of Go on Ubuntu:
$ sudo add-apt-repository ppa:longsleep/golang-backports
$ sudo apt-get update
2. Run this command to install make, tar, wget, curl, rpm, qemu-utils, golang-1.15-go, genisoimage, python-minimal3.8, bison, and gawk packages on Ubuntu:
$ sudo apt -y install make tar wget curl rpm qemu-utils golang-1.15-go genisoimage python-minimal bison gawk
3. Run this command to install pigz on Ubuntu. This is an optional package to install. It is recommended but not required to have:
$ sudo apt -y install pigz
4. Create soft link of go inside user’s bin directory to fix go 1.15 link:
$ sudo ln -vsf /usr/lib/go-1.15/bin/go /usr/bin/go
5. Run these commands to install the Docker engine on Ubuntu:
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
$ sudo usermod -aG docker $USER
Log out and Login after this to save the permission changes.
6. Install git on Ubuntu if not installed:
$ sudo apt install git
How to Build CBL-Mariner ISO Image?
After installation of all the required packages. Let’s see how to build CBL-Mariner ISO Image.
1. Clone CBL-Mariner to your local disk:
$ git clone https://github.com/microsoft/CBL-Mariner.git
2. Check out the desired release branch. Sync to the latest stable build.
$ git checkout 1.0-stable
3. Change your directory to CBL-Mariner/toolkit/ and build ISO bootable image using this command:
$ cd CBL-Mariner/toolkit/
$ sudo make iso REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/full.json
Note: This process may take 1 to 2 Hrs. Wait to complete the process.
You will see bootable CBL-Mariner ISO Image inside /CBL-Mariner/out/images/full:
Download Pre-Built CBL-Mariner ISO file:
We are going to share the CBL-Mariner ISO file which we have created. You can download the bootable CBL-Mariner ISO file from here.
As we promised, we have shown step by step procedure to build a CBL-Mariner ISO image along with a prebuilt ISO file which would save your time to build a CBL-Mariner ISO from the scratch.
Thanks for reading this tutorial post. Please visit our site to read more such interesting tutorials.
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/270015.html