OVN (Open Virtual Network) を用いる事により、OVS (Open vSwitch)が動作する複数のサーバー(Hypervisor/Chassis)を横断する仮想ネットワークを構築する事ができます。
本スライドはOVNを用いた論理ネットワークの構成と設定サンプルのメモとなります。
Using OVN, you can build logical network among multiple servers (Hypervisor/Chassis) running OVS (Open vSwitch).
This slide is describes HOW TO example of OVN configuration to create 2 logical switch connecting 4 VMs running on 2 chassis.
This document contains a series of numbers, symbols, and letters with no context or explanation. It does not provide any clear information that can be summarized in 3 sentences or less.
IoT Devices Compliant with JC-STAR Using Linux as a Container OSTomohiro Saneyoshi
Security requirements for IoT devices are becoming more defined, as seen with the EU Cyber Resilience Act and Japan’s JC-STAR.
It's common for IoT devices to run Linux as their operating system. However, adopting general-purpose Linux distributions like Ubuntu or Debian, or Yocto-based Linux, presents certain difficulties. This article outlines those difficulties.
It also, it highlights the security benefits of using a Linux-based container OS and explains how to adopt it with JC-STAR, using the "Armadillo Base OS" as an example.
Feb.25.2025@JAWS-UG IoT
12. HOTの構造
先にシンプルなテンプレート例を紹介しましたが、実際のテン
プレートはもっと多くの情報を含んでいます。
ここではトップレベルの構造を紹介します。現在のテンプレート
は5つのセクションをテンプレート内に持ちます。
heat_template_version, resources 以外は省略可能です。
12
heat_template_version: 2015-04-30
description: Demo template for the 09th lecture.
parameters:
image:
type: string
label: Image name or ID
description: Image to be used for the server.
default: CentOS-7-x86_64-GenericCloud-1509-witn-cfntools-1.3.0-2
resources:
private_network:
type: OS::Neutron::Net
outputs:
instance_ip:
description: The IP address of the deployed instance
value: { get_attr: [floating_ip, floating_ip_address] }
テンプレートのバージョン
テンプレートの説明
外部から変更可能なパラメータを定義する
作成するリソースを記述する。最も重要。
スタック内の情報を外部へ出力する
13. テンプレート例
以下は仮想ルーター、仮想ネットワークを作成・接続し、論理ポートを作
成した後で、インスタンスを一台起動して、Floating IPを与える例です。
13
parameters:
image:
type: string
label: Image name or ID
description: Image to be used for the server.
default: CentOS-7-x86_64-GenericCloud-1509-witn-cfntools-1.3.0-2
flavor:
type: string
label: Flavor
description: Type of instance (flavor) to be used on the compute instance.
default: m1.small
key:
type: string
label: Key name
description: Name of key-pair to be installed on the compute instance.
default: temp-key-001
public_network:
type: string
label: Public network name or ID
description: Public network with floating IP addresses.
default: public
ext_router:
type: string
label: Router name
description: Router name or ID to connect to an external network.
default: Ext-Router
secgroup:
type: string
label: Secgroup name
description: Security group name.
default: web_server_security_group
resources:
private_network:
type: OS::Neutron::Net
private_subnet:
type: OS::Neutron::Subnet
properties:
network_id: { get_resource: private_network }
cidr: 10.10.20.0/24
dns_nameservers:
- 8.8.8.8
- 8.8.4.4
router-interface:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_param: ext_router }
subnet: { get_resource: private_subnet }
neutron-port:
type: OS::Neutron::Port
properties:
network: { get_resource: private_network }
security_groups:
- { get_param: secgroup }
test-instance:
type: OS::Nova::Server
properties:
image: { get_param: image }
flavor: { get_param: flavor }
key_name: { get_param: key }
networks:
- port: { get_resource: neutron-port }
floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network: { get_param: public_network }
floating_ip_assoc:
type: OS::Neutron::FloatingIPAssociation
properties:
floatingip_id: { get_resource: floating_ip }
port_id: { get_resource: flasky_port }
14. Parameters セクション
定義したパラメーターの値はテンプレート内から get_param
関数で参照可能です。
パラメーターにはデフォルト値を設定することが可能。
デフォルト値は、スタック作成時に上書き可能。
14
parameters:
image:
type: string
label: Image name or ID
description: Image to be used for the server.
default: CentOS-7-x86_64-GenericCloud-1509-witn-cfntools-1.3.0-2
flavor:
type: string
label: Flavor
description: Type of instance (flavor) to be used on the compute
instance.
default: m1.small
$ heat stack-create -f heat.yaml -P 'image=Ubuntu14.04lts;flavor=m1.medium' stack-name
test-instance:
type: OS::Nova::Server
properties:
image: { get_param: image }
flavor: { get_param: flavor }
key_name: { get_param: key }
networks:
- port: { get_resource: neutron-port }
パラメーターの値を参照
(通常はデフォルト値が参
照される)
パラメーターを上書きしてスタックを作成
する例
16. Outputs セクション
作成したスタックの情報を外部に出力する。
他のプログラムとの連携や、別のテンプレートで仕様する。
16
outputs:
instance_name:
description: Name of the instance
value: { get_attr: [test-instance, name] }
instance_ip:
description: The IP address of the deployed instance
value: { get_attr: [floating_ip, floating_ip_address] }
[
{
"output_value": "test3-test-instance-2xmjvlijsyrz",
"description": "Name of the instance",
"output_key": "instance_name"
},
{
"output_value": "172.16.0.104",
"description": "The IP address of the deployed instance",
"output_key": "instance_ip"
}
]
17. リソースの依存関係
Resourcesセクションでは get_resource, get_attr で他のリソースを参照した場合に、Heat側で自動で依存関係が設定されます。
リソース作成時に、 depend_on パラメーターを与える事で、ユーザーが依存関係を設定することも可能。
依存関係が設定されている場合、依存元のリソースの作成が完了してから、リソースの作成が行われる。
それ以外のリソースは平行で作成されていく。
以下のテンプレートからスタックを作成した場合・・・
17
heat_template_version: 2015-04-30
description: Demo template for the 09th lecture.
parameters:
image:
type: string
label: Image name or ID
description: Image to be used for the server.
default: CentOS-7-x86_64-GenericCloud-1509-witn-cfntools-1.3.0-2
flavor:
type: string
label: Flavor
description: Type of instance (flavor) to be used on the compute instance.
default: m1.small
key:
type: string
label: Key name
description: Name of key-pair to be installed on the compute instance.
default: temp-key-001
public_network:
type: string
label: Public network name or ID
description: Public network with floating IP addresses.
default: public
ext_router:
type: string
label: Router name
description: Router name or ID to connect to an external network.
default: a3f094b5-fe83-4a92-a161-dece054ff0b0
resources:
wait_condition:
type: OS::Heat::WaitCondition
properties:
handle: { get_resource: wait_handle }
count: 1
timeout: 600
wait_handle:
type: OS::Heat::WaitConditionHandle
web_server_security_group:
type: OS::Neutron::SecurityGroup
properties:
name: web_server_security_group
rules:
- protocol: icmp
- protocol: tcp
port_range_min: 22
port_range_max: 22
- protocol: tcp
port_range_min: 443
port_range_max: 443
- protocol: tcp
port_range_min: 80
port_range_max: 80
private_network:
type: OS::Neutron::Net