Step By Step Procedure To Build A CBL-Mariner ISO Image!

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 SONiCAzure 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.

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:

  1. Ubuntu Linux or any popular distribution.
  2. Go Language
  3. Docker Engine
  4. make
  5. tar
  6. wget
  7. curl
  8. rpm
  9. qemu-utils
  10. golang-1.15-go
  11. genisoimage
  12. python-minimal
  13. bison
  14. gawk
  15. git

Time needed: 4 hours.

How to Build CBL-Mariner ISO Image?

  1. Run this command to add a backports repo to install the necessary version of Go on Ubuntu:

  2. $ sudo add-apt-repository ppa:longsleep/golang-backports
    $ sudo apt-get update
  3. 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

  4. 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

  5. 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

  6. 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

    Note: Log out and Log in to save the changes to the user.

  7. Install git on Ubuntu if not installed:

    $ sudo apt install git

  8. Clone CBL-Mariner to your local disk:

    $ git clone https://github.com/microsoft/CBL-Mariner.git

  9. Check out the desired release branch. Sync to the latest stable build.

    $ git checkout 1.0-stable

  10. 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.

Tutorial

  1. 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
Step By Step Procedure To Build A CBL-Mariner ISO Image!
Step By Step Procedure To Build A CBL-Mariner ISO Image!

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

Step By Step Procedure To Build A CBL-Mariner ISO Image!

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

Step By Step Procedure To Build A CBL-Mariner ISO Image!

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

Step By Step Procedure To Build A CBL-Mariner ISO Image!

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.

Step By Step Procedure To Build A CBL-Mariner ISO Image!
Step By Step Procedure To Build A CBL-Mariner ISO Image!
Step By Step Procedure To Build A CBL-Mariner ISO Image!

6. Install git on Ubuntu if not installed:
$ sudo apt install git

Step By Step Procedure To Build A CBL-Mariner ISO Image!

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

Step By Step Procedure To Build A CBL-Mariner ISO Image!

2. Check out the desired release branch. Sync to the latest stable build.
$ git checkout 1.0-stable

Step By Step Procedure To Build A CBL-Mariner ISO Image!

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.

Step By Step Procedure To Build A CBL-Mariner ISO Image!

You will see bootable CBL-Mariner ISO Image inside /CBL-Mariner/out/images/full:

Step By Step Procedure To Build A CBL-Mariner ISO Image!

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

(0)
上一篇 2022年6月24日
下一篇 2022年6月24日

相关推荐

发表回复

登录后才能评论