1 Fulcon / Slot-OS Platform 0.4 Copyright (C) 2015-2016 NIWA Hideyuki
2 Apache License Version 2.0
4 ## What is Fulcon/Slot-OS?
6 - Slot-OS divides the HOST machine into two or more software partitions (slot).
7 - Each slot can be operated like another machine of the same composition.
8 - Root of the Fulcon/Slot-OS container has a strong root authority, and the same operation as root of HOST is possible.
9 - The slot can dynamically compose the network. (SDN function)
11 ## Function of Fulcon/Slot-OS
12 - Function to divide machine into two or more slots
13 - Function to generate image for slot from rootfs of HOST
14 - Dynamic addition and deletion (SDN) function of two or more Internet Protocol addresses
15 - Allocation of resource of each slot (CPU%, number of CPU, and memory size) and dynamic modification function
16 - Console function of slot
17 - Listing function of the entire slot
18 - Suspension (temporary stop) and resume of slot
19 - Automatic update-function of two or more slots
20 - High-speed backup function
22 Fulcon can handle CentOS 7, Ubuntu 15.04, 15.10, Fedora 23
28 $ sudo apt-get install docker.io python-ipy bridge-utils openvswitch-switch
29 $ sudo systemctl enable docker.service
30 $ sudo systemctl start docker.service
31 $ sudo dpkg -i fulcon_0.4_amd64.deb
32 $ sudo systemctl enable fulcon.service
33 $ sudo systemctl start fulcon.service
37 $ sudo yum install docker-io python-IPy bridge-utils openvswitch
38 $ sudo systemctl enable docker.service
39 $ sudo systemctl start docker.service
40 $ sudo rpm -ivh fulcon-0.4-1.el7.centos.x86_64.rpm
41 $ sudo systemctl enable fulcon.service
42 $ sudo systemctl start fulcon.service
48 $ sudo apt-get install docker.io python-ipy bridge-utils openvswitch-switch
49 $ sudo systemctl enable docker.service
50 $ sudo systemctl start docker.service
54 $ sudo systemctl enable fulcon.service
55 $ sudo systemctl start fulcon.service
59 $ sudo yum install docker-io python-IPy bridge-utils openvswitch
60 $ sudo systemctl enable docker.service
61 $ sudo systemctl start docker.service
65 $ sudo systemctl enable fulcon.service
66 $ sudo systemctl start fulcon.service
70 #### 1. Generation of OS image (make-base-image subcommand)
72 If the slot-os image has not been generated yet, the slot-os image is necessary as OS of slot.
73 Rootfs for slot is generated from rootfs of HOST.
74 It takes 50 minutes from ten minutes for generation. (Depend on the machine performance and the size of rootfs. )
76 $ sudo fulcon make-base-image
78 #### 2. Making of Slot partition (build subcommand)
79 - HOST is divided into two or more slot.
80 - The resource of Slot is automatically initialized.
81 CPU% = (all CPU the number)*100% / (slot number)
82 allocation CPU = all CPU the number
84 - When 0 is specified for a number of Slot, all slot is deleted.
86 The following examples divide HOST into three.
88 $ sudo Slot-OS build 3
92 #### 3.The display the list of slot (list subcommand)
93 The "list of slot" is displayed.
94 Slot number, state, slot name, CPU%, CPU allocation, and memory size,
95 autostart, image names, and Internet Protocol addresses
98 0 : RUNNING slot00 66 % 0-1 512m A Slot-OS 172.17.0.2
99 1 : STOPPED slot01 66 % 0-1 512m - Slot-OS
100 2 : STOPPED slot02 66 % 0-1 512m - Slot-OS
102 #### 4. Boot of slot (start subcommand)
103 All slot or of specify slot is booted by the number.
105 The 0th slot is booted.
106 $ sudo slot-os start 0
108 0 : RUNNING slot00 66 % 0-1 512m A Slot-OS
109 1 : STOPPED slot01 66 % 0-1 512m - Slot-OS
110 2 : STOPPED slot02 66 % 0-1 512m - Slot-OS
113 $ sudo slot-os start all
115 0 : RUNNING slot00 66 % 0-1 512m A Slot-OS
116 1 : RUNNING slot01 66 % 0-1 512m - Slot-OS
117 2 : RUNNING slot02 66 % 0-1 512m - Slot-OS
119 #### 5. Console of Slot
120 The console of Slot number 0 is opened.
122 $ sudo slot-os console 0
124 #### 6. Update and package application (update, update-prog, and update-deploy subcommand)
126 It is an automatic update as for the package of all slot.
128 $ sudo slot-os update all
130 The package is copied under/root of all slot.
132 $ sudo slot-os deploy all : perl-XML-Parser-2.41-8.el7.x86_64.rpm /root
134 The package copied with all slot is installed.
136 $ sudo slot-os update-prog all : rpm -ivh /root/perl-XML-Parser-2.41-8.el7.x86_64.rpm
138 The package copied with all slot is deleted.
140 $ sudo slot-os update-prog all : rm -f /root/perl-XML-Parser-2.41-8.el7.x86_64.rpm
142 #### 7. Stop and renewal of slot (start, stop, suspend, and resume subcommand)
146 $ sudo slot-os stop 0
150 $ sudo slot-os start 0
152 Temporary stop (suspension)
154 $ sudo slot-os suspend 0
158 $ sudo slot-os resume 0
160 #### 8. Backup and restoration of slot (backup and restore subcommand)
164 $ sudo slot-os backup 0 bkup1
166 "bkup1" describes it on of putting on the backup name. Anything is good
167 in the alphanumeric character.
168 The backup image name is as follows.
171 Restoration of backup
173 $ sudo slot-os backup-restore 0 slot00.bkkup1
177 $ sudo slot-os backup-list
179 The initialization of slot restores slot-os.
181 $ sudo slot-os backup-restore 0 slot-os
183 #### 9. Dynamic addition and deletion of network (net-add and net-del subcommand)
185 When Slot is booted, the network of 172.17.0.0/16 is added.
186 This Internet Protocol address changes at each boot.
187 NAT setting of network of 172.17.0.0/16
189 Internet Protocol address is added. The address of 192.168.18.2/24 is added to 0 of
190 Slot as the first NIC.
192 $ sudo slot-os net-add 0 192.168.18.2/24 1
194 Addition of second NIC
196 $ sudo slot-os net-add 0 192.168.78.3/24 2
198 The state of NIC is displayed.
200 $ sudo slot-os net-info
201 slot00 eth0 172.17.0.2/16
202 slot00 vgslot00_1 192.168.18.2/24
203 slot00 vgslot00_2 192.168.78.2/24
205 Internet Protocol address is deleted.
206 IP of the second of Slot 0 are deleted.
208 $ sudo slot-os net-del 0 2
210 #### 10. NIC of HOST is shared (net-nic-add and net-nic-del subcommand).
212 Outside HOST and slot communicates sharing NIC of HOST.
213 The NIC name of HOST : with ens7f1 for address 10.124.23.91/24.
215 $ sudo slot-os net-nic-add ens7f1
217 It adds it to the third Slot 0 by 10.124.23.101/24.
219 $ sudo slot-os net-add 0 10.124.23.101/24 3
221 It comes to be able to access slot 0 outside HOST by 10.124.23.101.
223 NIC(ens7f1) of HOST is removed.
225 $ sudo slot-os net-nic-del ens7f1
231 auotstart NAME [ on | off ] ( all | SLOT_NUMBER...)
232 NAME is started automatically at the time of a system restart.
234 backup NUMBER NEW_NAME
235 slot in NUMBER is backuped. A backup will be slotXX.NEW_NAME.
237 backup-del IMAGE_NAME
238 A backup of IMAGE_NAME is erased.
241 A list of backups is indicated.
243 backup-restore SLOT_NUMBER BACKUP_IMAGE
244 backup image is restored in slot.
246 br-add BRIDGE_NUMBER ( IPADDR/MASK | NET_DEVICE ]
247 The IP-address or the device is registered in the bridge.
250 The IP-address or the device is deleted in the bridge.
253 Information on the bridge where NIC that adds it is connected is displayed.
256 HOST is separated in NUMBER and slot is made.
257 When 0 is specified, all slot is erased.
260 The list of the made slot is displayed.
261 Display term is as follows.
262 NUM, Status, Container name, CPU%, CPUS, Memory, Autostart(A or -), Image name, IP address
264 It always keeps indicating list. When stopping, ^c is pushed.
271 The list of the made slot is displayed.
274 fulcon/slot-os image is generated from HOST.
275 It even takes tens of minutes for completion.
277 net-add SLOT_NUMBER IPADDR/MASK NIC_NUMBER
278 NIC is added to the slot.
280 net-del SLOT_NUMBER NIC_NUMBER
281 NIC is deleted from the slot.
284 Information on the network where NIC that adds it is connected is displayed.
287 resource [-c CPU] [-n CPUSET] [-m MEM] ( all | NUMBER ... )
288 The resource allocated in the slot is displayed if there is no "-c, -n, -m" option.
290 The ratio of allocated CPU is % specified.
292 The allocated CPU number is specified.
294 The allocated memory size are specified.
295 "M" and "G" can be used for the unit.
298 resume ( all | NUMBER ... )
299 Resume does the slot in the state of SUSPENDED by suspend.
301 start ( all | NUMBER ... )
302 The slot of the specified NUMBER is started.
305 stop ( all | NUMBER ... )
306 The slot of the specified NUMMBER is stopped.
309 suspend ( all | NUMBER ... )
310 The NUMBER of the specified NUMBER is suspended.
313 update ( all | NUMBER ...)
314 All slot os packages are updated.
315 "Yum update" is done in centos. In ubuntu,
316 "Apt-get update" and "Apt-get upgrade" are done.
319 update-prog ( all | NUMBER ... ) : COMMAND
320 A COMMAND program for update is executed in NUMBER of slot.
323 update-deploy NUMBER ... : SRC_FILE DEST_PATH
324 SRC_FILE on the HOST is copied in DEST_PATH of NUMBER of slot.