SlideShare una empresa de Scribd logo
1 de 28
Descargar para leer sin conexión
Powered
by
Megazone
Cloud
Open-Source Multi Cloud Management Platform
Last Update: 2022-04-18
Deep Dive into SpaceONE
Choonho Son
choonhoson@megazone.com
Powered
by
Megazone
Cloud
● Micro Service Overview
● SpaceONE API
● SpaceONE Framework
● Plugin Architecture
Powered
by
Megazone
Cloud
Micro Service Overview
Frontend
Backend
Plugins
console, console-api, console-assets
identity, secret, repository, plugin, config,
inventory, monitoring, statistics, billing,
cost-analysis
supervisor, plugin-xxxx
Github Repositories
standalone micro-services common library
relationship of
micro-services
python-core
api
SpaceONE consists of three micro service groups, Frontend, Backend, and Plugins
Powered
by
Megazone
Cloud
Micro Service Overview
Interface
CMP
Function
SpaceONE CMP Features
Management Portal
• Dashboard
• Reporting *
SDK
• API
• CLI
Inventory
• Resource Discovery
• Resource Classification
• On-premise integration *
• Multi-cloud
Identity
• User management
• Service Account mgmt.
• Project management
Monitoring
• Monitoring and Analysis
• Application Performance
monitoring *
Billing (Hyper billing)
• Consolidated billing
• Expense management
Basic features
Each component becomes standalone micro service.
ex) identity, inventory, monitoring, billing, console (Management portal)
Special functionality which supports other
micro services.
ex) secret, repository, plugin, config, supervisor
secret Saving encrypted credentials.
(ex. AWS secret_id, API_TOKEN …)
repository Provides available plugin
information. (ex. AWS collector)
Provides metadata like Policy,
Schema
plugin Manage running plugin list.
config Manage user or global variables.
supervisor Deploy plugins.
Powered
by
Megazone
Cloud
gRPC API
gRPC API gRPC API gRPC API
Plugin Interface
AWS Collector GCP Collector Azure Collector
...
Micro Service Overview
python-core
api
inventory
api
python-core
plugin-azure-cloud-services-inven-colle
ctor
Interface specification of
each micro service’s functionality
Backend micro service
framework
Implementation of micro service
inventory
micro service
inventory collector
micro services
Backend
Plugins
Github Repositories
Backend and Plugins has same S/W structure using API and python-core as common libraries. Each micro service implements API
spec.
Powered
by
Megazone
Cloud
Hands-on Lab (1) Minikube
https://spaceone.org/docs/setup_operation/quick_install/
(2) install spaceone using helm chart
helm install spaceone -f minikube.yaml
spaceone/spaceone
(1) prepare minikube
minikube start --driver=docker --memory=4096mb
Powered
by
Megazone
Cloud
[Hands-on Lab] Minikube
admin / Admin123!@#
http://localhost:8080
kubectl port-forward -n spaceone svc/console 8080:80 &
kubectl port-forward -n spaceone svc/console-api 8081:80 &
Powered
by
Megazone
Cloud
[Hands-on Lab] Minikube
Create New User
Administration > IAM
Login as New User
abc@example.com
Powered
by
Megazone
Cloud
[Hands-on Lab] Minikube
Create Project Group Create Project
Powered
by
Megazone
Cloud
SpaceONE API (gRPC protobuf)
https://github.com/spaceone-dev/api.git
gRPC (https://grpc.io)
● RPC based Framework from Google (Open-source version of Google
Stubby)
● Efficient communication protocol for distributed MSA
Proto
Buffer
(servicer)
gRPC
Server
Proto
Buffer
(stub)
gRPC
Client
Protobuf (IDL)
Protobuf Request
Protobuf Response
Interface Description between Server and Client
Byte stream communication with encoding message
Message size is 3~10 times smaller than XML, 20~100 times faster
Easy to implement different languages, C/C++, Java, Python, NodeJS,
Go
Interface Description Language based on Google
Protocol Buffer
Client Server
Powered
by
Megazone
Cloud
SpaceONE API (gRPC protobuf)
syntax = "proto3";
package spaceone.api.sample.v1;
// desc: The greeting service definition.
service HelloWorld {
// desc: Sends a greeting
rpc say_hello (HelloRequest) returns (HelloReply) {}
}
// desc: The request message containing the user's name.
message HelloRequest {
// is_required: true
string name = 1;
}
// desc: The response message containing the greetings
message HelloReply {
string message = 1;
}
https://github.com/spaceone-dev/api/blob/master/proto/spaceone/api/sample/v1/helloworld.proto
helloworld.proto
helloworld_pb2.py
helloworld_pb2_grpc.py
Compile
Descriptor of Messages
HelloRequest
HelloReply
Class of Service
HelloWorldStub
HelloWorldServicer
add_HelloWorldServicer_to_server
Powered
by
Megazone
Cloud
SpaceONE API (gRPC API)
SpaceONE API is a specification of each micro service’s functionalities.
gRPC API
The inventory micro service is a manipulation of cloud resources.
DB
micro service
name
Verb
(gRPC: method)
Resource
(gRPC: Service)
https://spaceone-dev.gitbook.io/spaceone-apis/inventory/v1
Server
Cloud Service
Job
…
…
For example, the inventory creates Server information on DB, and provides update, delete, list functionalities.
Resources
Verb
Powered
by
Megazone
Cloud
SpaceONE API (Plugin Interface)
Plugin Interface is an extension of micro service’s functionalities which are delegated to plugin micro services for scalability and
flexibility.
gRPC API For example, inventory micro service wants to collect multi cloud(AWS, Google, Azure)
resources.
https://spaceone-dev.gitbook.io/spaceone-apis/inventory/plugin/collector
Plugin Interface
gRPC API
AWS Collector
Resource: Collector
verb:
- init
- verify
- collect
Plugins
gRPC API
GCP Collector Verb
(gRPC: method)
Resource
(gRPC: Service)
Verb
(gRPC: method)
Resource
(gRPC: Service)
Every plugin should implement “init”, “verify”, and “collect” methods.
method parameters
(gRPC: message)
method return
(gRPC: message)
Powered
by
Megazone
Cloud
SpaceONE API (Plugin Interface)
gRPC API For example, inventory micro service wants to collect multi cloud(AWS, Google, Azure)
resources.
https://spaceone-dev.gitbook.io/spaceone-apis/
Plugin Interface
gRPC API
AWS Collector
Resource: Collector
verb:
- init
- verify
- collect
Plugins
Name Collector ID Plugin Info (metadata of collector plugin)
AWS Collector collector-1234 plugin_id: plugin-aws-collector
plugin version: 1.0.1
GCP Collector collector-5678 plugin_id: plugin-gcp-collector
plugin version: 1.2.3
…
inventory.Collector Table
gRPC API
GCP Collector
DB
Collector
API call: inventory.Collector( collector_id: collector-1234
).collect( )
micro service
name
Verb
(gRPC: method)
Resource
(gRPC: Service)
API call: plugin.Collector.collect( )
Powered
by
Megazone
Cloud
Hands-on Lab (2) build API
https://spaceone.org/docs/developers/api_sdk/api/
(2) make python
(1) git clone
https://github.com/spaceone-dev/api.git
Powered
by
Megazone
Cloud
SpaceONE Framework (Backend S/W Framework)
SpaceONE development team has created our own S/W framework like Python Django or Java Spring. We especially supports a
gRPC interface.
Layer Description
Interface
(API)
Entry point of Service Request
Handler Pre, Post processing of service call
Service Business logic of service
Cache Caching for manager
function(optional)
Manager Unit Operation for each service
function
Connector Interface for Data Source(ex. DB,
Other micro services)
https://spaceone.org/docs/developers/architecture/microservice_framework/
Powered
by
Megazone
Cloud
SpaceONE Framework (Software Skeleton)
Every backend and plugin micro services has same software directories.
Running micro service (gRPC)
COMMAND: spaceone grpc spaceone.<micro service name> <options>
service name Command
identity spaceone grpc spaceone.identity
inventory spaceone grpc spaceone.inventory
secret spaceone grpc spaceone.secret
sample spaceone grpc spaceone.sample
Software Skeleton
Powered
by
Megazone
Cloud
SpaceONE Framework (Server Type)
Backend S/W framework acts as various types, gRPC server, scheduler, worker, and rest server.
identity
(gRPC)
inventory
(gRPC)
inventory
(scheduler)
inventory
(worker)
monitoring
(gRPC)
monitoring
(rest)
Single code, use multiple
way!
identity service inventory service monitoring service
Powered
by
Megazone
Cloud
SpaceONE Framework (Handler)
Handler is pre/post processing of service
Handler is an annotation of service.
sequential processing
authentication → authorization →
mutation → event
Add annotation
handler implementation:
python-core
Powered
by
Megazone
Cloud
SpaceONE Framework (Handler)
Every micro services contacts identity, before executing API body.
inventory identity
Server.list( )
TOKEN: xxxx
Domain.get_public_key( )
@authentication
@authorization Authorization.verify(service, resource, verb )
domain_id, key, key_type
role_type, projects[],
project_groups[]
AUTHENTICATION_FAILURE
AUTHORIZATION_FAILURE
You are valid user!
Permit to execute this API
!
Execute main
body
Server list
Powered
by
Megazone
Cloud
SpaceONE Framework (Transaction)
Keep track of API call flow via Transaction ID.
inventory identity
Collector.collect( )
TOKEN: xxxx
@authentication, authorization
Execute main
body
Response
secret
Secret.get_data(
) plugin
Plugin.get_plugin_endpoint( )
tnx-1234
tnx-1234
tnx-1234
create New Transaction
transfer previous Transaction
Used as debugging and performance analysis
Transaction is automatically
created or delivered by core
framework. @transaction
Powered
by
Megazone
Cloud
SpaceONE Framework (Database Model)
Each micro service maintains its own database model.
micro service B
micro service A
Database (ex. MySQL)
micro service B
micro service A
Database
(ex. MySQL)
Database
(ex. NoSQL)
Conventional way, just separate Application only.
Easy to implement.
Separate Application and Database.
Each application has its own appropriate database.
Relationship is maintained by DB level.
ex. Primary key, secondary key
Relationship is maintained by Application
level.
ex. tenant_id, domain_id
V.S
Powered
by
Megazone
Cloud
SpaceONE Framework (Database Model)
Developer is not familiar with Database! No SQL statement in a program (Database Persistence Layer)
Database is abstracted as class.
from spaceone.inventory.model.server_model import Server
…
server_vo: Server = self.server_model.create(params)
just call class methods
ex) create, update, delete , list
Create class than call method!
DB table ⇒ Class
Field member ⇒ Class
member
Powered
by
Megazone
Cloud
Hands-on Lab (3) Plugins
Powered
by
Megazone
Cloud
[Hands-on Lab] Plugins
Create Service Account
Asset Inventory > Service Account
Create AWS Account
check AWS in Service
Providers
https://spaceone.org/docs/guides/service_account/aws_service_account_policy_management/
Powered
by
Megazone
Cloud
[Hands-on Lab] Plugins
Create Collector
Asset Inventory > Collector
Create
select aws-ec2
Powered
by
Megazone
Cloud
[Hands-on Lab] Plugins
Create Collector
Asset Inventory > Collector
In the “root-supervisor”
namespace
Powered
by
Megazone
Cloud
[Hands-on Lab] Plugins
collect AWS Resources
Asset Inventory > Collector
1) Select collector
2) trigger “Collect Data”
API: inventory.Collector.collect( )

Más contenido relacionado

Similar a Deep Dive into SpaceONE

Running gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on KubernetesRunning gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on Kubernetes
Sungwon Lee
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter ObiltschnigMastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
WithTheBest
 
Running the-next-generation-of-cloud-native-applications-using-open-applicati...
Running the-next-generation-of-cloud-native-applications-using-open-applicati...Running the-next-generation-of-cloud-native-applications-using-open-applicati...
Running the-next-generation-of-cloud-native-applications-using-open-applicati...
NaveedAhmad239
 

Similar a Deep Dive into SpaceONE (20)

Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use cases
 
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
Up and Running with gRPC & Cloud Career [GDG-Cloud-Dhaka-IO/2022}
 
Usable APIs at Scale
Usable APIs at ScaleUsable APIs at Scale
Usable APIs at Scale
 
Mastering Microservices with Kong (DevoxxUK 2019)
Mastering Microservices with Kong (DevoxxUK 2019)Mastering Microservices with Kong (DevoxxUK 2019)
Mastering Microservices with Kong (DevoxxUK 2019)
 
Running gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on KubernetesRunning gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on Kubernetes
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
 
Using Istio to Secure & Monitor Your Services
Using Istio to Secure & Monitor Your ServicesUsing Istio to Secure & Monitor Your Services
Using Istio to Secure & Monitor Your Services
 
ASP.NET Core 3.0 Deep Dive
ASP.NET Core 3.0 Deep DiveASP.NET Core 3.0 Deep Dive
ASP.NET Core 3.0 Deep Dive
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
 
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
 
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter ObiltschnigMastering the IoT With JavaScript and C++ - Günter Obiltschnig
Mastering the IoT With JavaScript and C++ - Günter Obiltschnig
 
Containerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS Lambda
 
MuleSoft Meetup Roma - Processi di Automazione su CloudHub
MuleSoft Meetup Roma - Processi di Automazione su CloudHubMuleSoft Meetup Roma - Processi di Automazione su CloudHub
MuleSoft Meetup Roma - Processi di Automazione su CloudHub
 
The magic behind your Lyft ride prices: A case study on machine learning and ...
The magic behind your Lyft ride prices: A case study on machine learning and ...The magic behind your Lyft ride prices: A case study on machine learning and ...
The magic behind your Lyft ride prices: A case study on machine learning and ...
 
Running the-next-generation-of-cloud-native-applications-using-open-applicati...
Running the-next-generation-of-cloud-native-applications-using-open-applicati...Running the-next-generation-of-cloud-native-applications-using-open-applicati...
Running the-next-generation-of-cloud-native-applications-using-open-applicati...
 
Pulsar summit asia 2021 apache pulsar with mqtt for edge computing
Pulsar summit asia 2021   apache pulsar with mqtt for edge computingPulsar summit asia 2021   apache pulsar with mqtt for edge computing
Pulsar summit asia 2021 apache pulsar with mqtt for edge computing
 
[AWSKRUG&JAWS-UG Meetup #1] Serverless Real-Time Analysis
[AWSKRUG&JAWS-UG Meetup #1]  Serverless  Real-Time Analysis[AWSKRUG&JAWS-UG Meetup #1]  Serverless  Real-Time Analysis
[AWSKRUG&JAWS-UG Meetup #1] Serverless Real-Time Analysis
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Building Advanced Serverless Workflows with AWS Step Functions | AWS Floor28
Building Advanced Serverless Workflows with AWS Step Functions | AWS Floor28Building Advanced Serverless Workflows with AWS Step Functions | AWS Floor28
Building Advanced Serverless Workflows with AWS Step Functions | AWS Floor28
 
Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demo
 

Último

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Último (20)

Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

Deep Dive into SpaceONE

  • 1. Powered by Megazone Cloud Open-Source Multi Cloud Management Platform Last Update: 2022-04-18 Deep Dive into SpaceONE Choonho Son choonhoson@megazone.com
  • 2. Powered by Megazone Cloud ● Micro Service Overview ● SpaceONE API ● SpaceONE Framework ● Plugin Architecture
  • 3. Powered by Megazone Cloud Micro Service Overview Frontend Backend Plugins console, console-api, console-assets identity, secret, repository, plugin, config, inventory, monitoring, statistics, billing, cost-analysis supervisor, plugin-xxxx Github Repositories standalone micro-services common library relationship of micro-services python-core api SpaceONE consists of three micro service groups, Frontend, Backend, and Plugins
  • 4. Powered by Megazone Cloud Micro Service Overview Interface CMP Function SpaceONE CMP Features Management Portal • Dashboard • Reporting * SDK • API • CLI Inventory • Resource Discovery • Resource Classification • On-premise integration * • Multi-cloud Identity • User management • Service Account mgmt. • Project management Monitoring • Monitoring and Analysis • Application Performance monitoring * Billing (Hyper billing) • Consolidated billing • Expense management Basic features Each component becomes standalone micro service. ex) identity, inventory, monitoring, billing, console (Management portal) Special functionality which supports other micro services. ex) secret, repository, plugin, config, supervisor secret Saving encrypted credentials. (ex. AWS secret_id, API_TOKEN …) repository Provides available plugin information. (ex. AWS collector) Provides metadata like Policy, Schema plugin Manage running plugin list. config Manage user or global variables. supervisor Deploy plugins.
  • 5. Powered by Megazone Cloud gRPC API gRPC API gRPC API gRPC API Plugin Interface AWS Collector GCP Collector Azure Collector ... Micro Service Overview python-core api inventory api python-core plugin-azure-cloud-services-inven-colle ctor Interface specification of each micro service’s functionality Backend micro service framework Implementation of micro service inventory micro service inventory collector micro services Backend Plugins Github Repositories Backend and Plugins has same S/W structure using API and python-core as common libraries. Each micro service implements API spec.
  • 6. Powered by Megazone Cloud Hands-on Lab (1) Minikube https://spaceone.org/docs/setup_operation/quick_install/ (2) install spaceone using helm chart helm install spaceone -f minikube.yaml spaceone/spaceone (1) prepare minikube minikube start --driver=docker --memory=4096mb
  • 7. Powered by Megazone Cloud [Hands-on Lab] Minikube admin / Admin123!@# http://localhost:8080 kubectl port-forward -n spaceone svc/console 8080:80 & kubectl port-forward -n spaceone svc/console-api 8081:80 &
  • 8. Powered by Megazone Cloud [Hands-on Lab] Minikube Create New User Administration > IAM Login as New User abc@example.com
  • 10. Powered by Megazone Cloud SpaceONE API (gRPC protobuf) https://github.com/spaceone-dev/api.git gRPC (https://grpc.io) ● RPC based Framework from Google (Open-source version of Google Stubby) ● Efficient communication protocol for distributed MSA Proto Buffer (servicer) gRPC Server Proto Buffer (stub) gRPC Client Protobuf (IDL) Protobuf Request Protobuf Response Interface Description between Server and Client Byte stream communication with encoding message Message size is 3~10 times smaller than XML, 20~100 times faster Easy to implement different languages, C/C++, Java, Python, NodeJS, Go Interface Description Language based on Google Protocol Buffer Client Server
  • 11. Powered by Megazone Cloud SpaceONE API (gRPC protobuf) syntax = "proto3"; package spaceone.api.sample.v1; // desc: The greeting service definition. service HelloWorld { // desc: Sends a greeting rpc say_hello (HelloRequest) returns (HelloReply) {} } // desc: The request message containing the user's name. message HelloRequest { // is_required: true string name = 1; } // desc: The response message containing the greetings message HelloReply { string message = 1; } https://github.com/spaceone-dev/api/blob/master/proto/spaceone/api/sample/v1/helloworld.proto helloworld.proto helloworld_pb2.py helloworld_pb2_grpc.py Compile Descriptor of Messages HelloRequest HelloReply Class of Service HelloWorldStub HelloWorldServicer add_HelloWorldServicer_to_server
  • 12. Powered by Megazone Cloud SpaceONE API (gRPC API) SpaceONE API is a specification of each micro service’s functionalities. gRPC API The inventory micro service is a manipulation of cloud resources. DB micro service name Verb (gRPC: method) Resource (gRPC: Service) https://spaceone-dev.gitbook.io/spaceone-apis/inventory/v1 Server Cloud Service Job … … For example, the inventory creates Server information on DB, and provides update, delete, list functionalities. Resources Verb
  • 13. Powered by Megazone Cloud SpaceONE API (Plugin Interface) Plugin Interface is an extension of micro service’s functionalities which are delegated to plugin micro services for scalability and flexibility. gRPC API For example, inventory micro service wants to collect multi cloud(AWS, Google, Azure) resources. https://spaceone-dev.gitbook.io/spaceone-apis/inventory/plugin/collector Plugin Interface gRPC API AWS Collector Resource: Collector verb: - init - verify - collect Plugins gRPC API GCP Collector Verb (gRPC: method) Resource (gRPC: Service) Verb (gRPC: method) Resource (gRPC: Service) Every plugin should implement “init”, “verify”, and “collect” methods. method parameters (gRPC: message) method return (gRPC: message)
  • 14. Powered by Megazone Cloud SpaceONE API (Plugin Interface) gRPC API For example, inventory micro service wants to collect multi cloud(AWS, Google, Azure) resources. https://spaceone-dev.gitbook.io/spaceone-apis/ Plugin Interface gRPC API AWS Collector Resource: Collector verb: - init - verify - collect Plugins Name Collector ID Plugin Info (metadata of collector plugin) AWS Collector collector-1234 plugin_id: plugin-aws-collector plugin version: 1.0.1 GCP Collector collector-5678 plugin_id: plugin-gcp-collector plugin version: 1.2.3 … inventory.Collector Table gRPC API GCP Collector DB Collector API call: inventory.Collector( collector_id: collector-1234 ).collect( ) micro service name Verb (gRPC: method) Resource (gRPC: Service) API call: plugin.Collector.collect( )
  • 15. Powered by Megazone Cloud Hands-on Lab (2) build API https://spaceone.org/docs/developers/api_sdk/api/ (2) make python (1) git clone https://github.com/spaceone-dev/api.git
  • 16. Powered by Megazone Cloud SpaceONE Framework (Backend S/W Framework) SpaceONE development team has created our own S/W framework like Python Django or Java Spring. We especially supports a gRPC interface. Layer Description Interface (API) Entry point of Service Request Handler Pre, Post processing of service call Service Business logic of service Cache Caching for manager function(optional) Manager Unit Operation for each service function Connector Interface for Data Source(ex. DB, Other micro services) https://spaceone.org/docs/developers/architecture/microservice_framework/
  • 17. Powered by Megazone Cloud SpaceONE Framework (Software Skeleton) Every backend and plugin micro services has same software directories. Running micro service (gRPC) COMMAND: spaceone grpc spaceone.<micro service name> <options> service name Command identity spaceone grpc spaceone.identity inventory spaceone grpc spaceone.inventory secret spaceone grpc spaceone.secret sample spaceone grpc spaceone.sample Software Skeleton
  • 18. Powered by Megazone Cloud SpaceONE Framework (Server Type) Backend S/W framework acts as various types, gRPC server, scheduler, worker, and rest server. identity (gRPC) inventory (gRPC) inventory (scheduler) inventory (worker) monitoring (gRPC) monitoring (rest) Single code, use multiple way! identity service inventory service monitoring service
  • 19. Powered by Megazone Cloud SpaceONE Framework (Handler) Handler is pre/post processing of service Handler is an annotation of service. sequential processing authentication → authorization → mutation → event Add annotation handler implementation: python-core
  • 20. Powered by Megazone Cloud SpaceONE Framework (Handler) Every micro services contacts identity, before executing API body. inventory identity Server.list( ) TOKEN: xxxx Domain.get_public_key( ) @authentication @authorization Authorization.verify(service, resource, verb ) domain_id, key, key_type role_type, projects[], project_groups[] AUTHENTICATION_FAILURE AUTHORIZATION_FAILURE You are valid user! Permit to execute this API ! Execute main body Server list
  • 21. Powered by Megazone Cloud SpaceONE Framework (Transaction) Keep track of API call flow via Transaction ID. inventory identity Collector.collect( ) TOKEN: xxxx @authentication, authorization Execute main body Response secret Secret.get_data( ) plugin Plugin.get_plugin_endpoint( ) tnx-1234 tnx-1234 tnx-1234 create New Transaction transfer previous Transaction Used as debugging and performance analysis Transaction is automatically created or delivered by core framework. @transaction
  • 22. Powered by Megazone Cloud SpaceONE Framework (Database Model) Each micro service maintains its own database model. micro service B micro service A Database (ex. MySQL) micro service B micro service A Database (ex. MySQL) Database (ex. NoSQL) Conventional way, just separate Application only. Easy to implement. Separate Application and Database. Each application has its own appropriate database. Relationship is maintained by DB level. ex. Primary key, secondary key Relationship is maintained by Application level. ex. tenant_id, domain_id V.S
  • 23. Powered by Megazone Cloud SpaceONE Framework (Database Model) Developer is not familiar with Database! No SQL statement in a program (Database Persistence Layer) Database is abstracted as class. from spaceone.inventory.model.server_model import Server … server_vo: Server = self.server_model.create(params) just call class methods ex) create, update, delete , list Create class than call method! DB table ⇒ Class Field member ⇒ Class member
  • 25. Powered by Megazone Cloud [Hands-on Lab] Plugins Create Service Account Asset Inventory > Service Account Create AWS Account check AWS in Service Providers https://spaceone.org/docs/guides/service_account/aws_service_account_policy_management/
  • 26. Powered by Megazone Cloud [Hands-on Lab] Plugins Create Collector Asset Inventory > Collector Create select aws-ec2
  • 27. Powered by Megazone Cloud [Hands-on Lab] Plugins Create Collector Asset Inventory > Collector In the “root-supervisor” namespace
  • 28. Powered by Megazone Cloud [Hands-on Lab] Plugins collect AWS Resources Asset Inventory > Collector 1) Select collector 2) trigger “Collect Data” API: inventory.Collector.collect( )