1 ## Fulcon VirtualPlatform
3 `Fulcon` is the system container tool.
5 ## State of the project
7 In Fulcon, the container can be handled like VM.
8 Fulcon constructs the system by generating the container, logging in
9 from the console, and installing the package with yum and apt, and stops
10 the system with shutdown command.The container can be connected directly with
11 the Internet by adding virtual NIC.
12 Fulcon can handle CentOS 7 and Ubuntu 15.04
18 $ sudo apt-get install docker.io
19 $ sudo apt-get install python-ipy
20 $ sudo apt-get install bridge-utils
21 $ sudo dpkg -i fulcon_0.3_amd64.deb
25 $ sudo yum install docker-io
26 $ sudo yum install python-IPy
27 $ sudo yum install bridge-utils
28 $ sudo rpm -ivh fulcon-0.3-1.el7.centos.x86_64.rpm
34 $ sudo apt-get install docker.io
35 $ sudo apt-get install python-ipy
36 $ sudo apt-get install bridge-utils
44 $ sudo yum install docker-io
45 $ sudo yum install python-IPy
46 $ sudo yum install bridge-utils
54 1) The image of CentOS 7, Ubuntu15.04 and Ubuntu15.10 is prepared.
56 $ sudo fulcon setup centos7
57 $ sudo fulcon setup ubuntu1504
58 $ sudo fulcon setup ubuntu1510
60 It takes the minute to several ten completion.
61 It only has to execute only the kind of the image to be used.
62 This operation do only first once.
64 The image is builded by using Dockerfile.
65 If it does not go well.images are generated with following Dockerfile.
66 /var/lib/fulcon/driver/dockerfile/centos7/Dockerfile
67 /var/lib/fulcon/driver/dockerfile/ubuntu1504/Dockerfile
68 /var/lib/fulcon/driver/dockerfile/ubuntu1510/Dockerfile
69 It must be builded "fulcon/centos7", "fulcon/ubuntu1504" and "fulcon/ubuntu1510"
71 2) The image of default is set.
73 $ sudo fulcon set-default-image fulcon/centos7
75 $ sudo fulcon set-default-image fulcon/ubuntu1504
77 $ sudo fulcon set-default-image fulcon/ubuntu1510
79 fulcon/centos7 is set in the following examples.
83 #### 1.Generation of container
85 In the following example, the container "webap-server" is generated.
87 $ sudo fulcon sysgen webap-server
89 The container of "fulcon/centos7" was generated.
90 It is optional -c, and "fulcon/ubuntu1504" can be specified.
92 $ sudo fulcon sysgen -c fulcon/ubuntu1504 another-server
94 #### 2.The user is added, and the password is set.
96 In the following example, the user "niwa" is seted.
97 The last argument is set to passwd.
99 $ sudo fulcon add-user webap-server niwa
101 Please use optional "-s" to give the sudo right to the user.
103 $ sudo fulcon add-user -s webap-server tom
105 Please use the "set-passwd" sub-command if you want to change the password.
107 $ sudo fulcon set-passwd webap-server niwa
109 The "del-user" subcommand is used to delete the user from the container.
111 $ sudo fulcon del-user webap-server tom
113 #### 3.Virtual NIC addition
115 $ sudo fulcon net-add webap-server 192.168.17.2/24
117 Information of network is able to be taken by "fulcon net-info".
119 $ sudo fulcon net-info
121 When the network is connected with host's device in the container it,
122 optional "-d" is used.
123 IP-address specifies it within the range of same netmask as the shared device.
125 In the following example, when it is NIC "eth1" and the address is
126 "192.168.0.2/24", "192.168.0.12/24" is allocated in the container.
128 $ sudo fulcon net-add -d eth1 webap-server 192.168.0.12/24
130 #### 4.Attache console to the container.
132 $ sudo fulcon console webap-server
134 You return from the console to the host if you do "Exit".
136 #### 5.When you login the container, yum and apt can be used.
137 You can login with ssh.
138 "shutdown -h now" can be used in container.
140 #### 6.Stop and start of container
142 $ sudo fulcon stop webap-server
144 $ sudo fulcon start webap-server
146 #### 7.List containers
150 #### 8.Erase container
152 $ sudo fulcon erase webap-server
160 add-user [ -n REAT_NUMBER ] [ -s ] CONTAINER_NAME USER [PASSWORD ]
161 A new user is registered in OS of the container.
162 The password is set with PASSWORD.
163 The password is interactively set when there is no PASSWORD.
165 It is specified to the container name that CONTAINER_NAME and
167 ex) "AB" and 3 : AB0001, AB0002, AB0003
169 The user gets administrator's rights.
171 br-add BRIDGE_NUMBER ( IPADDR/MASK | NET_DEVICE ]
172 The IP-address or the device is registered in the bridge.
174 br-del BRIDGE_NUMBER ( IPADDR/MASK | NET_DEVICE ]
175 The IP-address or the device is deleted in the bridge.
178 Information on the bridge where NIC that adds it is connected is displayed.
180 clone CONTAINER_NAME NEW_IMAGENAME
181 A new image is made from the container.
182 New containers of the same content can be made from a new image.
184 console [ -n REPEAT_NUMBER ] CONTAINER_NAME
185 It enters the container with the console.
187 It is specified to the container name that CONTAINER_NAME and
189 ex) "AB" and 3 : AB0001, AB0002, AB0003
192 The default image that generates the container is displayed.
194 del-image IMAGE_NAME ...
195 The specified image is deleted.
198 The specified OCF image is deleted.
199 (The OCF image becomes basic that generates the container.)
201 del-user CONTAINER_NAME USERNAME
202 The user specified in the container is deleted.
204 deploy [ -c IMAGE ] SRC_FILE DEST_PATH
205 SRC_FILE on the host is copied in DEST_PATH of all containers.
207 Only a container of IMAGE is made the target.
208 IMAGE is the part of the image name.
211 The container system that uses it as a driver of fulcon is displayed.
213 erase CONTAINER_NAME ...
214 erase -n REPEAT_NUMBER CONTAINER_NAME
215 The specified container is deleted.
217 It is specified to the container name that CONTAINER_NAME and
219 ex) "AB" and 3 : AB0001, AB0002, AB0003
225 The list of the registered image is displayed.
228 The list of the made container is displayed.
231 The OCF image is loaded as an image used for the container.
234 The list of the image is displayed.
237 The list of the OCF image is displayed.
239 net-add -n VETH_NUMBER [-d NIC_DEVICE] [-g GATEWAY] [-b BRIDGE_NUMBER ] CONTAINER_NAME IP_ADDR/MASK
240 NIC is added to the container.
242 NIC that combines "Container name and specified number" is added.
243 ex) VETH_NUMBER is 1 and container is "abc" -> nic "abc1"
245 The device to connect it to an external network is specified.
247 GATEWAY that is used in the container
249 BRIDGE that combines "'fulcon' and specified number" is added.
250 ex) BRIDGE_NUMBER is 2 -> nic "fulcon2"
252 net-del -n VETH_NUMBER CONTAINER_NAME
253 NIC is deleted from the container.
255 NIC that combines "Container name and specified number" is added.
256 ex) VETH_NUMBER is 1 and container is "abc" -> nic "abc1"
259 Information on the network where NIC that adds it is connected is displayed.
261 rename CONTAINER_NAME NEW_NAME
262 The container name is renamed.
264 resource [-c CPU] [-n CPUSET] [-m MEM] NAME
265 The resource allocated in the container is displayed if there is no "-c, -n, -m" option.
267 The ratio of allocated CPU is % specified.
269 The allocated CPU number is specified.
271 The allocated memory size are specified.
272 "M" and "G" can be used for the unit.
275 Resume does the container in the state of PAUSED by suspend.
278 The OCF image is saved as an image used for the container.
280 set-default-image [ IMAGE_NAME ]
281 Default image is set.
282 The default image that generates the container is displayed.
284 set-passwd NAME USERNAME
285 User's password in the container is set.
287 setup [ -n ] [ -p ] IMAGE_NAME
288 The image is newly made.
290 Generates a new image from a Dockerfile.
293 The value of the environment variable "Http_proxy, https_proxy, and ftp_proxy" is used.
295 setup-prog [ -c IMAGE ] COMMAND
296 The same command is carried out by more than one container.
298 Only a container of IMAGE is made the target.
299 IMAGE is the part of the image name.
301 start CONTAINER_NAME ...
302 start -n REPEAT_NUMBER CONTAINER_NAME
303 The container of the specified name is started.
305 "User and password" is set to the container of
306 the name that NAME and the figure combined.
307 ex) "AB" and 3 : AB0001, AB0002, AB0003
310 stop -n REPEAT_NUMBER NAME
311 The container of the specified name is stopped.
313 "User and password" is set to the container of
314 the name that NAME and the figure combined.
315 ex) "AB" and 3 : AB0001, AB0002, AB0003
317 suspend CONTAINER_NAME
318 The container of the specified name is suspended.
320 sysgen [ -c IMAGE ] NAME NAME ...
321 sysgen -n REPEAT_NUMBER [ -c IMAGE ] NAME
322 The container of the specified name is generated.
324 "User and password" is set to the container of
325 the name that NAME and the figure combined.
326 ex) "AB" and 3 : AB0001, AB0002, AB0003
329 All containers are renewed.
330 "Yum update" is done in centos. In ubuntu,
331 "Apt-get update" and "Apt-get upgrade" are done.