photon-os-3-beta-first-steps-guide

Photon OS is a popular choice, when running container on top of VMware vSphere. The linux operating system with a very small footprint has been tuned to run on vSphere at best performance.

Let´s see how to get it up and running – from deploying the OVF template to running docker container and monitoring the system using Performance Analyzer.

Before we start deploying, let´s take a look at the Photon OS summary:

Project Photon OS™ is an open source, minimal Linux container host that is optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS 2.0 includes new security features, OS management capabilities, and updated packages. We invite partners, customers, and community members to collaborate on using Photon OS to run high-performance virtual machines and containerized applications.

  • Optimized for VMware vSphere®: The Linux kernel is tuned for performance when Photon OS runs on vSphere.
  • Support for containers: Photon OS includes the Docker daemon and works with container orchestration frameworks, such as Mesos and Kubernetes.
  • Efficient lifecycle management: Photon OS is easy to manage, patch, and update.
  • Security hardened: The kernel and other aspects of the operating system are built with an emphasis on security.

There is also a factsheet available

The result will be a updated, running Photon OS, ready to run container and fully monitored.

monitor all systems

Deploy the OVA image

Deploy Photon OS OVF

You can find the latest OVF Template here and add the download link into the deployment wizard: 

https://github.com/vmware/photon/wiki/Downloading-Photon-OS

Deploy from url

Finish the Deploy OVF template wizard and power on the Photon OS VM that will use a DHCP address for now.

Before you start the new virtual machine, please make sure to configure the cpu and memory resources to match your requirements. Running container inside a virtual machine is very resource intense any you should keep an eye on the resource usage. Btw. you can always monitor the Photon OS as well as the docker container using Opvizor Performance Analyzer. Just start a free trial today.

Set a manual ip address

As the VMware tools are preinstalled, you can check the current IP address and login using SSH or of course the web client console.

Check initial IP address

Use the root account and the initial password changeme

Then you need to change the root password to something harder to guess.

IP address setup

If you want to stick with the dynamic ip address, you can skip this section. For a manual ip address, you can follow these steps:

  1. best is to rename the following file /etc/systemd/network/99-dhcp-en.network mv /etc/systemd/network/99-dhcp-en.network /etc/systemd/network/10-manual-en.network
  2. change the file content to match your network, example:

===============

[Match]

Name=e*

[Network]

DHCP=no

Address=192.168.0.10/24

Gateway=192.168.0.1

DNS=8.8.8.8 9.9.9.9

Domains=mydomain.local

NTP=0.pool.ntp.org 1.pool.ntp.org

===============

If you want to change the host name, please do so in /etc/hostname

reboot and check the ip address, using ip a

Install Photon OS patches

To update Photon OS, just connect to the system and type:

tdnf update

tdnf upgrade

That´s it.

Activate SUDO

SUDO is not installed by default, but is highly recommended to setup.

tdnf install sudo

Then add a new user that will be able to use sudo.

useradd -m -G sudo user

(-m creates the home directory /home/user; -G adds the user to the sudoers group)

set the password for the new user

passwd user

That´s it. Log out and use the new user account to log in. Try an update using sudo and the user password.

sudo tdnf update

Enable Docker

Docker is installed by default but not activated at boot.

To activate docker type:

sudo systemctl enable docker

To start docker type:

sudo systemctl start docker

Install Docker-Compose

More often than not, you want to run a bunch of container using docker-compose. As its not installed by default, you need to download the latest docker-compose release – currently its 1.23.1

curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Then make docker-compose executable:

chmod +x /usr/local/bin/docker-compose

Monitor Photon OS

wget: 

sudo tdnf install wget

Performance Analyzer agent for Linux: 

wget http://perfanalyzer_ip_fqdn/packages/telegraf.rpm

sudo rpm -i –nodeps telegraf.rpm

replace the telegraf.conf under /etc/telegraf to fit your needs.

sudo wget -O telegraf.conf http://perfanalyzer_ip_fqdn/packages/linuxconf/telegraf.conf

Install and start the service

sudo wget -O /etc/systemd/system/telegraf.service https://raw.githubusercontent.com/influxdata/telegraf/master/scripts/telegraf.service

sudo systemctl enable telegraf

sudo systemctl start telegraf

Monitor Photon OS using Performance Analyzer

To monitor docker as well, you need to allow the telegraf user to access the docker socket:

sudo usermod -aG docker telegraf

and add the following section at the end of the telegraf.conf file to collect docker metrics as well:

[[inputs.docker]]

  endpoint = "unix:///var/run/docker.sock"

  container_names = []

  timeout = "5s"

  perdevice = true

  ## Whether to report for each container total blkio and network stats or not

  total = false

  ## docker labels to include and exclude as tags.  Globs accepted.

  ## Note that an empty array for both will include all labels as tags

  docker_label_include = []

  docker_label_exclude = []

Restart the telegraf service to load the new configuration.

sudo systemctl restart telegraf

That´s it – all done and fully monitored:

Docker monitoring on Photon OS

CNIL
Metrics and Logs

(formerly, Opvizor Performance Analyzer)

VMware vSphere & Cloud
PERFORMANCE MONITORING, LOG ANALYSIS, LICENSE COMPLIANCE!

Monitor and Analyze Performance and Log files:
Performance monitoring for your systems and applications with log analysis (tamperproof using immudb) and license compliance (RedHat, Oracle, SAP and more) in one virtual appliance!

Subscribe to Our Newsletter

Get the latest product updates, company news, and special offers delivered right to your inbox.

Subscribe to our newsletter

Use Case - Tamper-resistant Clinical Trials

Goal:

Blockchain PoCs were unsuccessful due to complexity and lack of developers.

Still the goal of data immutability as well as client verification is a crucial. Furthermore, the system needs to be easy to use and operate (allowing backup, maintenance windows aso.).

Implementation:

immudb is running in different datacenters across the globe. All clinical trial information is stored in immudb either as transactions or the pdf documents as a whole.

Having that single source of truth with versioned, timestamped, and cryptographically verifiable records, enables a whole new way of transparency and trust.

Use Case - Finance

Goal:

Store the source data, the decision and the rule base for financial support from governments timestamped, verifiable.

A very important functionality is the ability to compare the historic decision (based on the past rulebase) with the rulebase at a different date. Fully cryptographic verifiable Time Travel queries are required to be able to achieve that comparison.

Implementation:

While the source data, rulebase and the documented decision are stored in verifiable Blobs in immudb, the transaction is stored using the relational layer of immudb.

That allows the use of immudb’s time travel capabilities to retrieve verified historic data and recalculate with the most recent rulebase.

Use Case - eCommerce and NFT marketplace

Goal:

No matter if it’s an eCommerce platform or NFT marketplace, the goals are similar:

  • High amount of transactions (potentially millions a second)
  • Ability to read and write multiple records within one transaction
  • prevent overwrite or updates on transactions
  • comply with regulations (PCI, GDPR, …)


Implementation:

immudb is typically scaled out using Hyperscaler (i. e. AWS, Google Cloud, Microsoft Azure) distributed across the Globe. Auditors are also distributed to track the verification proof over time. Additionally, the shop or marketplace applications store immudb cryptographic state information. That high level of integrity and tamper-evidence while maintaining a very high transaction speed is key for companies to chose immudb.

Use Case - IoT Sensor Data

Goal:

IoT sensor data received by devices collecting environment data needs to be stored locally in a cryptographically verifiable manner until the data is transferred to a central datacenter. The data integrity needs to be verifiable at any given point in time and while in transit.

Implementation:

immudb runs embedded on the IoT device itself and is consistently audited by external probes. The data transfer to audit is minimal and works even with minimum bandwidth and unreliable connections.

Whenever the IoT devices are connected to a high bandwidth, the data transfer happens to a data center (large immudb deployment) and the source and destination date integrity is fully verified.

Use Case - DevOps Evidence

Goal:

CI/CD and application build logs need to be stored auditable and tamper-evident.
A very high Performance is required as the system should not slow down any build process.
Scalability is key as billions of artifacts are expected within the next years.
Next to a possibility of integrity validation, data needs to be retrievable by pipeline job id or digital asset checksum.

Implementation:

As part of the CI/CD audit functionality, data is stored within immudb using the Key/Value functionality. Key is either the CI/CD job id (i. e. Jenkins or GitLab) or the checksum of the resulting build or container image.

White Paper — Registration

We will also send you the research paper
via email.

CodeNotary — Webinar

White Paper — Registration

Please let us know where we can send the whitepaper on CodeNotary Trusted Software Supply Chain. 

Become a partner

Start Your Trial

Please enter contact information to receive an email with the virtual appliance download instructions.

Start Free Trial

Please enter contact information to receive an email with the free trial details.