Skip to content

Deploy ‐ Oracle Cloud

Alexandre S Hostert edited this page Dec 19, 2024 · 10 revisions

Infinite Ez uses openSUSE MicroOS as its base operating system. However, Oracle Cloud, as many cloud vendors, does not provide MicroOS out of-the-box unfortunately.

In this article you'll learn how to upload openSUSE MicroOS to Oracle Cloud, configure it with Cloud Shell and then deploy Infinite Ez.

Don't worry, we'll soon have an image of Infinite Ez on the marketplace so you can deploy with a single click ⚡

Downloading the openSUSE MicroOS image

  1. Navigate to openSUSE MicroOS official site;

  2. Download the x86_64 version of QEMU image from the Base System + Container Runtime Environment column:

    Get the download URL for the x86_64 version of QEMU image

Uploading the openSUSE MicroOS image to Oracle Cloud

  1. Access the Oracle Cloud Console;

  2. Create an object storage bucket;

    Make sure you're on the region you want to deploy the instance.

    In the example below we named the bucket "custom-images":

    Object storage bucket

  3. Upload the copy of openSUSE MicroOS you just downloaded to the bucket;

    Since you may have multiple copies, we recommend adding the date to the name of the file.

    In the example we selected the storage tier of Infrequent Access but this is optional.

    Upload image

  4. Go to the Custom images section at the Compute page on Oracle Cloud console and click Import image:

    1. Select the compartment you want to use;

    2. On Name, give the image the same name of the file - without the extension;

    3. Select SUSE as Operating system;

    4. Select the bucket you created on Bucket;

    5. Select the image you uploaded on the Object name;

    6. Select QCOW2 as Image type;

    7. Click on Import image button;

    Custom image

Note

The upload process takes a couple minutes.

Creating a new instance

  1. Once the image state is Available, go to the Instances tab;

  2. Click on Create instance;

  3. Give the instance a name - usually the hostname is used;

  4. Select the Availability Domain at the Placement section - don't forget which one you selected, you will use it again later;

  5. On the Image and shape section, click on Change image;

  6. Click on My images and select the custom image;

    My images

  7. Choose a shape - Infinite Ez runs on 512MB instances, but we usually recommend 2GB RAM for a basic deployment;

  8. Usually we disable the Automatically assign public IPv4 address option and add the public IPv4 manually after the instance is deployed so we can select as a reserved IP, but this is up to you;

  9. The SSH keys section isn't very helpful cause in our tests Oracle Cloud is unable to upload the ssh key to the root user correctly, so you leave the default options set;

  10. Select the Specify a custom boot volume size, the default values is more than enough;

  11. Click on Create at the bottom of the page;

Creating a block volume

  1. Once the instance is created, go to the Block Volumes page and click on Create Block Volume;

  2. Give the block volume a name, i.e. data-disk-name-of-your-instance;

    Make sure the Availability Domain is the same as the Placement you selected when creating the instance.

  3. Select Custom at the volume size and set to at least 50 GB;

  4. Click on Create Block Volume;

    Create Block Volume

  5. Return to the instance details page and at the bottom you'll find a Resources tab;

  6. Select Attached block volumes and click on Attach block volume;

  7. On the modal, select the volume you just created and click on Attach;

    Ensure Paravirtualized is the selected Attachment Type.

    Attach volume

Accessing the instance

  1. Still on the Resources tab on the instance details page, go to Console Connection and click on Launch Cloud Shell connection;

    The Cloud Shell will appear at the bottom, click to Maximize Cloud Shell (the middle icon on the right).

    It will take a few minutes so the connection is established and you should see the setup wizard from MicroOS.

  2. The setup wizard will request the following:

    • Keyboard layout;
    • The timezone;
    • A password for root;
    • The option to create SSH keys, but we'll skip this for now;
    • The creation of an user, which we'll also skip;

    Once the wizard is finished, the droplet should reboot and you'll see the login prompt.

  3. Still on Cloud Shell;

    1. Log in as root;

    2. Use curl to upload your SSH public key and save it as the /root/.ssh/authorized_keys file:

    curl -skL https://yoursite.com/your_public_key -o /root/.ssh/authorized_keys
  4. Exit from your logged-in session and close the Cloud Shell;

Important

You can also use https://gist.github.com or https://pastebin.com to host your SSH public key.

Just make sure you're saving the raw version of your SSH key, so there is no HTML tags in it.

Infinite Ez installation

Important

You will now need to get the Public IPv4 address of your instance.

Get the Public IPv4 address from the Primary VNIC section still on the Instance details page.

Usually the default security rules for Oracle Cloud allows for SSH connection (on port 22) on public subnets.

If you want to have any custom rules added, you may choose a custom Network security group to be attached to the instance.

The Network security groups is a section inside the VCN section.

We won't explore the Network security groups setup in this article, but you may check the Oracle documentation to know how to create one.

We recommend creating one allowing traffic to the ports you intent to expose to the internet, such as tcp ports 80 (http), 443 (https), 1618 (infinite os) and 3141 (infinite ez).

Security rules

  1. Open a terminal or PuTTY session in your computer;

  2. Attempt to connect via SSH as root with the public IP address of the droplet and the private key matching the public key you uploaded to root user:

    ssh root@your_public_ip -i /path/to/your/private_key
  3. Once connected, set your hostname:

    hostnamectl set-hostname myhostname --static

    Replace myhostname with your desired hostname (Fully Qualified Domain Name).

  4. Create the /var/infinite/ directory:

    mkdir /var/infinite
  5. Upload the Infinite Ez zipped binary to it, unzip it and set the execute permission:

    curl -skL https://github.com/goinfinite/ez/releases/download/v0.0.9/ez_0-0-9_x86_64.tar.gz -o /var/infinite/ez.tar.gz
    tar -xzf /var/infinite/ez.tar.gz -C /var/infinite/
    chmod +x /var/infinite/ez
  6. Run the install command:

    /var/infinite/ez sys-install

    The instance will reboot twice, don't worry, it's expected.

  7. Check if the service is running fine:

    systemctl status ez

    If the service is not running, you can see what happened by checking this command:

    systemctl status sys-install-continue

    This command will tell you if there was any error during the installation process. After fixing the error, you can run the sys-install command again.

  8. Create the first user:

    ez account create -u yourUser -p passwordHere
  9. And it's done!

Tip

You can set the log level to debug by running:

echo 'LOG_LEVEL=debug' >>/var/infinite/.env

Accessing the Infinite Ez dashboard

You should be able to access the Infinite Ez dashboard now at https://yourpublicip:3141.

Don't forget to ignore the SSL warning as there is no valid SSL issued yet 😉

Know issues

AddDiskNotFound

If you see the error AddDiskNotFound during the installation process, it means the block volume was not attached correctly.

ez:~ # systemctl status sys-install-continue
× sys-install-continue.service - sys-install-continue
     Loaded: loaded (/etc/systemd/system/sys-install-continue.service; static)
     Active: failed (Result: exit-code) since Fri 2024-12-06 17:36:06 UTC; 3min 25s ago
 Invocation: 40925decaf644b3b9668a98ac5614ac7
TriggeredBy: ● sys-install-continue.timer
    Process: 1676 ExecStart=/var/infinite/ez sys-install (code=exited, status=1/FAILURE)
   Main PID: 1676 (code=exited, status=1/FAILURE)
        CPU: 37ms

Dec 06 17:36:06 ez.demo.goinfinite.net systemd[1]: Starting sys-install-continue...
Dec 06 17:36:06 ez.demo.goinfinite.net sys-install-continue[1676]: {"level":"info","time":"2024-12-06T17:36:06Z","message":"Formatting data disk..."}
Dec 06 17:36:06 ez.demo.goinfinite.net sys-install-continue[1676]: {"level":"error","time":"2024-12-06T17:36:06Z","message":"AddDiskNotFound"}
Dec 06 17:36:06 ez.demo.goinfinite.net sys-install-continue[1676]: {
Dec 06 17:36:06 ez.demo.goinfinite.net sys-install-continue[1676]:   "status": false,
Dec 06 17:36:06 ez.demo.goinfinite.net sys-install-continue[1676]:   "body": "AddDiskNotFound"
Dec 06 17:36:06 ez.demo.goinfinite.net sys-install-continue[1676]: }
Dec 06 17:36:06 ez.demo.goinfinite.net systemd[1]: sys-install-continue.service: Main process exited, code=exited, status=1/FAILURE
Dec 06 17:36:06 ez.demo.goinfinite.net systemd[1]: sys-install-continue.service: Failed with result 'exit-code'.
Dec 06 17:36:06 ez.demo.goinfinite.net systemd[1]: Failed to start sys-install-continue.

Make sure the block volume is attached to the instance and the Availability Domain is the same as the Placement you selected when creating the instance. Also, confirm it is a Paravirtualized attachment type.