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 python-ipy bridge-utils
19 $ sudo dpkg -i fulcon_0.3_amd64.deb
23 $ sudo yum install docker-io python-IPy bridge-utils
24 $ sudo rpm -ivh fulcon-0.3-1.el7.centos.x86_64.rpm
30 $ sudo apt-get install docker.io python-ipy bridge-utils
37 $ sudo yum install docker-io python-IPy bridge-utils
44 1) The image of CentOS 7, Ubuntu15.04 and Ubuntu15.10 is prepared.
46 $ sudo fulcon setup -d centos7
47 $ sudo fulcon setup -d ubuntu1504
48 $ sudo fulcon setup -d ubuntu1510
50 It takes the minute to several ten completion.
51 It only has to execute only the kind of the image to be used.
52 This operation do only first once.
54 The image is builded by using Dockerfile.
55 If it does not go well.images are generated with following Dockerfile.
56 /var/lib/fulcon/driver/dockerfile/centos7/Dockerfile
57 /var/lib/fulcon/driver/dockerfile/ubuntu1504/Dockerfile
58 /var/lib/fulcon/driver/dockerfile/ubuntu1510/Dockerfile
59 It must be builded "fulcon/centos7", "fulcon/ubuntu1504" and "fulcon/ubuntu1510"
61 2) The image of default is set.
63 $ sudo fulcon set-default-image fulcon/centos7
65 $ sudo fulcon set-default-image fulcon/ubuntu1504
67 $ sudo fulcon set-default-image fulcon/ubuntu1510
69 fulcon/centos7 is set in the following examples.
73 #### 1.Generation of container
75 In the following example, the container "webap-server" is generated.
77 $ sudo fulcon sysgen webap-server
79 The container of "fulcon/centos7" was generated.
80 It is optional -c, and "fulcon/ubuntu1504" can be specified.
82 $ sudo fulcon sysgen -c fulcon/ubuntu1504 another-server
84 #### 2.The user is added, and the password is set.
86 In the following example, the user "niwa" is seted.
87 The last argument is set to passwd.
89 $ sudo fulcon add-user webap-server niwa
91 Please use optional "-s" to give the sudo right to the user.
93 $ sudo fulcon add-user -s webap-server tom
95 Please use the "set-passwd" sub-command if you want to change the password.
97 $ sudo fulcon set-passwd webap-server niwa
99 The "del-user" subcommand is used to delete the user from the container.
101 $ sudo fulcon del-user webap-server tom
103 #### 3.Virtual NIC addition
105 $ sudo fulcon net-add webap-server 192.168.17.2/24
107 Information of network is able to be taken by "fulcon net-info".
109 $ sudo fulcon net-info
111 When the network is connected with host's device in the container it,
112 optional "-d" is used.
113 IP-address specifies it within the range of same netmask as the shared device.
115 In the following example, when it is NIC "eth1" and the address is
116 "192.168.0.2/24", "192.168.0.12/24" is allocated in the container.
118 $ sudo fulcon net-add -d eth1 webap-server 192.168.0.12/24
120 #### 4.Attache console to the container.
122 $ sudo fulcon console webap-server
124 You return from the console to the host if you do "Exit".
126 #### 5.When you login the container, yum and apt can be used.
127 You can login with ssh.
128 "shutdown -h now" can be used in container.
130 #### 6.Stop and start of container
132 $ sudo fulcon stop webap-server
134 $ sudo fulcon start webap-server
136 #### 7.List containers
140 #### 8.Erase container
142 $ sudo fulcon erase webap-server
150 add-user [ -n REAT_NUMBER ] [ -s ] CONTAINER_NAME USER [PASSWORD ]
151 A new user is registered in OS of the container.
152 The password is set with PASSWORD.
153 The password is interactively set when there is no PASSWORD.
155 It is specified to the container name that CONTAINER_NAME and
157 ex) "AB" and 3 : AB0001, AB0002, AB0003
159 The user gets administrator's rights.
161 br-add BRIDGE_NUMBER ( IPADDR/MASK | NET_DEVICE ]
162 The IP-address or the device is registered in the bridge.
164 br-del BRIDGE_NUMBER ( IPADDR/MASK | NET_DEVICE ]
165 The IP-address or the device is deleted in the bridge.
168 Information on the bridge where NIC that adds it is connected is displayed.
170 clone CONTAINER_NAME NEW_IMAGENAME
171 A new image is made from the container.
172 New containers of the same content can be made from a new image.
174 console [ -n REPEAT_NUMBER ] CONTAINER_NAME
175 It enters the container with the console.
177 It is specified to the container name that CONTAINER_NAME and
179 ex) "AB" and 3 : AB0001, AB0002, AB0003
182 The default image that generates the container is displayed.
184 del-image IMAGE_NAME ...
185 The specified image is deleted.
188 The specified OCF image is deleted.
189 (The OCF image becomes basic that generates the container.)
191 del-user CONTAINER_NAME USERNAME
192 The user specified in the container is deleted.
194 deploy [ -c IMAGE ] SRC_FILE DEST_PATH
195 SRC_FILE on the host is copied in DEST_PATH of all containers.
197 Only a container of IMAGE is made the target.
198 IMAGE is the part of the image name.
201 The container system that uses it as a driver of fulcon is displayed.
203 erase CONTAINER_NAME ...
204 erase -n REPEAT_NUMBER CONTAINER_NAME
205 The specified container is deleted.
207 It is specified to the container name that CONTAINER_NAME and
209 ex) "AB" and 3 : AB0001, AB0002, AB0003
215 The list of the registered image is displayed.
218 The list of the made container is displayed.
221 The OCF image is loaded as an image used for the container.
224 The list of the image is displayed.
227 The list of the OCF image is displayed.
229 net-add -n VETH_NUMBER [-d NIC_DEVICE] [-g GATEWAY] [-b BRIDGE_NUMBER ] CONTAINER_NAME IP_ADDR/MASK
230 NIC is added to the container.
232 NIC that combines "Container name and specified number" is added.
233 ex) VETH_NUMBER is 1 and container is "abc" -> nic "abc1"
235 The device to connect it to an external network is specified.
237 GATEWAY that is used in the container
239 BRIDGE that combines "'fulcon' and specified number" is added.
240 ex) BRIDGE_NUMBER is 2 -> nic "fulcon2"
242 net-del -n VETH_NUMBER CONTAINER_NAME
243 NIC is deleted from the container.
245 NIC that combines "Container name and specified number" is added.
246 ex) VETH_NUMBER is 1 and container is "abc" -> nic "abc1"
249 Information on the network where NIC that adds it is connected is displayed.
251 rename CONTAINER_NAME NEW_NAME
252 The container name is renamed.
254 resource [-c CPU] [-n CPUSET] [-m MEM] NAME
255 The resource allocated in the container is displayed if there is no "-c, -n, -m" option.
257 The ratio of allocated CPU is % specified.
259 The allocated CPU number is specified.
261 The allocated memory size are specified.
262 "M" and "G" can be used for the unit.
265 Resume does the container in the state of PAUSED by suspend.
268 The OCF image is saved as an image used for the container.
270 set-default-image [ IMAGE_NAME ]
271 Default image is set.
272 The default image that generates the container is displayed.
274 set-passwd NAME USERNAME
275 User's password in the container is set.
277 setup [[ -d ][ -n ] [ -p ] IMAGE_NAME ]
278 The image is newly made.
280 New image is downloaded from docker repositry.
282 Generates a new image from a Dockerfile.
285 The value of the environment variable "Http_proxy, https_proxy, and ftp_proxy" is used.
286 The image is generated from HOST if there is no argument.
288 update-prog [ -c IMAGE ] COMMAND
289 The same command is carried out by more than one container.
291 Only a container of IMAGE is made the target.
292 IMAGE is the part of the image name.
294 start CONTAINER_NAME ...
295 start -n REPEAT_NUMBER CONTAINER_NAME
296 The container of the specified name is started.
298 "User and password" is set to the container of
299 the name that NAME and the figure combined.
300 ex) "AB" and 3 : AB0001, AB0002, AB0003
303 stop -n REPEAT_NUMBER NAME
304 The container of the specified name is stopped.
306 "User and password" is set to the container of
307 the name that NAME and the figure combined.
308 ex) "AB" and 3 : AB0001, AB0002, AB0003
310 suspend CONTAINER_NAME
311 The container of the specified name is suspended.
313 sysgen [ -c IMAGE ] NAME NAME ...
314 sysgen -n REPEAT_NUMBER [ -c IMAGE ] NAME
315 The container of the specified name is generated.
317 "User and password" is set to the container of
318 the name that NAME and the figure combined.
319 ex) "AB" and 3 : AB0001, AB0002, AB0003
322 All containers are renewed.
323 "Yum update" is done in centos. In ubuntu,
324 "Apt-get update" and "Apt-get upgrade" are done.