Table of Contents

Introduction

Are you tired of struggling with complex micro-service architectures that slow deployment processes? If you're a developer looking for a streamlined, efficient solution for building and deploying micro-services, look no further than Phoesion Glow.

Phoesion Glow is a cutting-edge micro-service development framework that offers a complete solution for creating, deploying, and managing micro-services. Designed with simplicity and efficiency in mind, Phoesion Glow is the perfect tool for developers of all skill levels who want to create high-performance, scalable applications.

One of the key features of Phoesion Glow is its intuitive interface, which simplifies the creation and deployment of micro-services. With just a few clicks, you can create and deploy complex micro-services. In addition, Phoesion Glow offers native support for Kubernetes, a powerful open-source container orchestration platform that enables you to scale and manage your micro-services with ease. With Phoesion Glow, you can take advantage of the power and flexibility of Kubernetes, without the need for complex configuration or setup.

In this article, we will focus on the simplest deployment model using Phoesion Glow, which is using just one Linux Virtual Machine (VM) and setup Phoesion Glow as a systemd service.


Prerequisites

  1. A Windows machine with Visual Studio 2019/2022
  2. Phoesion Glow Blaze for Windows installed
  3. A Linux (Ubuntu) machine (that will host our services)
  4. A domain name*
Note
  • If you do not have a domain registered you can either use the server's IP, edit your hosts file, or create a free domain using Duck DNS (www.duckdns.org) for testing

Video Tutorial



Creating a Hello-World service

1. Create a new Solution

Create a new solution using Visual Studio with a Firefly Service Project project.

VisualStudio_Create_New_Solution_Type

Note

If you can't find the Firefly Service Project template, make sure you have Phoesion Glow Templates visual studio extension installed. If not you can get it from the Visual Studio Marketplace

2. Configure new Project

Name your new project and solution :

Project name : Foompany.Services.HelloWorld
Location : <Set your location>
Solution name : Foompany.Services

VisualStudio_Create_New_Solution_Configs

3. Create a Firefly Module

Now we need to create a firefly module with an action.

In the folder Modules, delete the Sample.cs that was generated by the template and create a new module named Greeter.cs like so
VisualStudio_Create_Module_Class_Greeter


4. Create an Action

In the new Greeter.cs, delete the Action1 function that was created by the template and add the following :

[Action(Methods.GET)]
public string SayHello()
{
    return "Hello world!";
}

Rebuild the solution and make sure everything compiles without any errors

5. Test/Debug your service locally

To start your service simply set it a Startup Project in Visual Studio and press F5. Wait until you see the Service Started! message, then you can test it by opening a browser and going to

You should see a "Hello World" message in your browser.


Create a Phoesion Glow Project

Next, we need to create a new Phoesion Glow Project.
A glow project is a JSON that contains the services' configuration and file locations.

  • To create a new project start the app Phoesion Glow Project Editor from your windows start menu or desktop.
    StartMenu_ProjectEditor

  • Click New Project
    Project_Editor_New

  • Save the new project in the same folder as your solution, with the name GlowProject Project_Editor_New_SaveDialog

  • Now that the new project has been created, you need to configure the services.

    1. Set for Namespace : Foompany.Services.

    2. Click the Add button in the Services section.

    3. Select your c# service project file (Foompany.Services.HelloWorld.csproj).

    4. Click save and close the project editor.

      Project_Editor_Add_Service


Setup the Linux Server

Installing cloud entities on Ubuntu

In this section, you will install and setup the components needed to create a full micro-service ecosystem on a Linux machine.

1. Install the Repository key

wget -qO - https://packages.phoesion.com/apt.key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/phoesion.gpg

2. Add Repository

echo "deb [signed-by=/usr/share/keyrings/phoesion.gpg] https://packages.phoesion.com/phoesion.glow linux main" | sudo tee /etc/apt/sources.list.d/phoesion.glow-main.list
sudo apt-get update

3. Install cloud entities packages :

sudo apt-get install -y phoesion.glow.kaleidoscope
sudo apt-get install -y phoesion.glow.lighthouse
sudo apt-get install -y phoesion.glow.prism
sudo apt-get install -y phoesion.glow.firefly
Note

Services will be installed under a new service user with username the entity name (eg. firefly), so you can adjust the rights for each entity service as you wish

Note

Phoesion Glow Lighthouse default port is 15000, so make sure your developers can reach this port!

Create an administrator account for Lighthouse

To be able to remotely connect to the Lighthouse you need to create an admin account. You can do this using the lighthouse-cli tool.

1. Start lighthouse-cli

lighthouse-cli

SSH_LightHouse_Cli_Start

2. Create a new administrator user

user add admin

3. Setup new administrator user

Enter the information for admin user

Password : YOUR_PASSWORD
Re-enter password : YOUR_PASSWORD
Role : 1
Name (optional) : Administrator
Email (optional) : [email protected]
Description (optional) : My Administrator Account

Leave Allowed IP empty, so you can login to the admin account remotely
Warning

Make sure for Role you enter is for an Administrator . Otherwise you will create a normal user with limited capabilities

SSH_LightHouse_Cli_AddUser


Deploy to the Phoesion Glow Lighthouse.

To deploy our services we need to connect from our dev-machine Phoesion Glow Blaze (Windows) to the Lighthouse that is now running on the server-machine (Linux). After we connect we can setup the environment and deploy our services.

1. Create a Lighthouse connection profile

To create a connection profile in Blaze for the admin Lighthouse account :

  1. Launch the Phoesion Glow Blaze app from the start menu.
    Phoesion Glow Blaze App

  2. Create a new lighthouse connection profile
    Create New Connection

    • Fill the configuration page
      Configure connection
      Connection Name : My Linux Server
      Hostname : [YOUR_SERVER_IP]
      Username : admin
      For Authentication Method select Password
      Password : [YOUR_PASSWORD]
      For Security Method select RSA/AES
      
      Note

      Replace [YOUR_SERVER_IP] and [YOUR_PASSWORD] with your own values

    • Click the Get button to retrieve the public RSA key from the lighthouse.
    • Click Save
  3. The new connection profile has been saved and is now available on the main screen. Click on it to connect to your Lighthouse instance.

2. Create a new Quantum Space

Your cloud can run more than one set of services.
Think of a Quantum Space as an isolated box that contains a set of micro-services and spans across your cloud servers.
For more in-depth info you can read about Quantum Spaces here.

2.1 Create a new Quantum Space

Blaze_Create_New_QuantumSpace

2.2 Setup new Quantum Space

We will create a new quantum space named 'Testing' and we will bind the domain 'localhost' (since we are testing on the local machine) to it.
(if 'localhost' is used by another qSpace, you can use 127.0.0.2 (see notes))

Quantum Space Name : Testing
Add Domain
Domain : localhost

Blaze_Create_New_QuantumSpace_Setup

Note

Replace [my_domain] with your domain, eg. services.mycompany.com

Note

If you want to have more than one Quantum Space on your local machine setup for testing, you can use another loopback interface as a domain (eg 127.0.0.2 or 127.0.0.3 etc). Then you can consume your service using the uri http://127.0.0.2:16000/MyService/...

2.3 Verify and create

Verify the information of your new Quantum Space and click 'Create' to create it.

2.4 Open the new Quantum Space

Once the new Quantum Space is created, you will be able to see it in the list. Click on it to open it.
Blaze_Create_Select_QuantumSpace

3. Deploy 'Hello World' Sample Services

Now we are ready to deploy the sample in the 'Testing' quantum space.

3.1 Start deploy wizard

Click the 'Deploy' button to start the deployment wizard.
Blaze_Deploy_Start

3.2 Start deploy wizard

  • For Project select the project.pgproject file from the sample.
  • Set the Build to Debug or Release.
  • Click 'Next'
    Blaze_Deploy_SelectProject

3.3 Deploy services

Once the project is compiled into a hologram, it can be deployed to the Lighthouse.
Click the 'Start Deploy' button to start the deployment.
Blaze_Deploy_Finish


Test your services

To test that your services are up and running open a browser and go to one of the following :


Summary

In this article, we demonstrated how easy it is to setup a scalable, micro-service deployment framework on your server and create/deploy a new micro-service.

With this setup now in place, creating more micro-services and deploying them into our Quantum-Space can be achieved with a few clicks. Using Phoesion Glow Blaze GUI tool we can monitor the health of our services and view logs or other incidents.

Phoesion Glow isn't just about ease of use - it's also a powerful, flexible framework that can handle even the most complex applications. With support for a wide range of frameworks and technologies, Phoesion Glow is the perfect tool for building any type of micro-service, from small, focused initiatives to large-scale, mission-critical applications. It offers robust monitoring and reporting capabilities, giving you complete visibility into the performance and health of your applications. With detailed metrics and alerts, you can quickly identify and resolve any issues that arise, ensuring that your micro-services are always performing at their best.

In conclusion, if you're a developer looking for a powerful, flexible, and easy-to-use solution for building and deploying micro-services, Phoesion Glow is the perfect tool for you. With its intuitive interface, native support for Kubernetes, and robust monitoring and reporting capabilities, Phoesion Glow makes it easy to build high-performance, scalable micro-services, no matter what your level of experience may be.

This was the first step of our cloud-service development journey!
For more information, you can dive into the documentation and sample repo.

Video Tutorial