Các lệnh thông dụng
Cloud Server
Danh sách server: bizfly server list
root@ubuntu-huantest:~# bizfly server list
Using config file: /root/.bizfly.yaml
ID NAME ZONE KEY NAME STATUS FLAVOR CATEGORY LAN IP WAN IP CREATED AT
d11b46f6-d9c8-4a8c-baca-d6f1eb17d53d VCTestHCM HCM1 ACTIVE 2c_2g premium 10.20.1.208 103.153.73.73 2022-11-10T05:00:52Z
c2db2af8-345a-4b0b-9c73-c2e12ca095f0 pool-bizflycloud-3aswhhiqk5azdpk5-node-ZBqZgWFo HCM1 maihv ACTIVE 2c_2g premium 10.20.1.94 14.225.215.62 2022-10-11T05:03:51Z
f35adeb3-5f40-41e4-9f42-95e169ca67f9 windows-2vcpu-2gb-1-KhangTetBW1 HCM1 maihv ACTIVE 2c_2g basic 10.20.1.106 103.153.74.76 2022-05-25T10:02:52Z
5a631046-23a5-41b0-bc12-c71d3f3ce78a windows-2vcpu-2gb-1-KhangTestBW HCM1 dinhvan ACTIVE 2c_2g premium 10.20.1.181 103.153.74.55 2022-03-31T08:28:20Z
Danh sách flavor: bizfly flavor list
root@ubuntu-huantest:~# bizfly flavor list
Using config file: /root/.bizfly.yaml
ID NAME
01013f0f-94ca-4e50-a808-e0604a659494 24c_64g
030d3d30-f646-4d92-b773-7958042ac0dc 24c_48g
035e0b34-9ff6-4087-8276-4b981265d776 3c_12g
036aeb4f-60d1-48d4-aa95-895d03b961be 3c_2g
037c6a81-ed0d-4771-910a-5c86f4376955 12c_12g
05875aa0-1995-4155-805f-fcac07b9b6b2 16c_8g
05e7e91b-fbca-4603-9990-129ebba55282 3c_4g
06152030-e366-44bd-b6e7-555a98b85f63 24c_48g
0689f221-0edb-40ff-aab1-646c845ae020 12c_48g
07bce4ef-1c03-47a5-90b2-be4b0c42975a 12c_12g
07d0129b-51b5-48b5-bbbd-19a7523ad3a9 12c_24g
0b0f0224-74fd-482a-be67-4dbf840a9f18 16c_48g
0c2d33a6-6827-41ad-9d0b-a426123161f6 3c_2g
0c3a8e65-6653-4a99-851d-524f5d22950e 2c_4g
0ceeec5d-eba5-401a-87d7-e5c15a43bc61 2c_2g
0e7854d8-be3b-48cd-90a4-5038ec64821d 8c_32g
11ecd7fb-a450-4aea-9e0d-7adf04dc4451 1c_1g
....
Danh sách image trong 1 region: bizfly image list
root@ubuntu-huantest:~# bizfly image list
Using config file: /root/.bizfly.yaml
ID DISTRIBUTION VERSION
37ce9f3e-a545-4182-948a-e51e7a9e63c0 Ubuntu 20.04 x64
c2d794b4-5bfc-4d4d-916b-b519c79ca816 Ubuntu 18.04 x64
24c5679e-aba6-4e59-8988-4633e890a5c2 Ubuntu 16.04 x64
905f72e5-813d-44a6-8ba3-5b6b68a44205 Ubuntu 22.04 x64
e59a80e3-fe80-4180-81b3-842a8b31c64b CentOS 8 x64
a3af2088-d52f-4e4d-9d37-e27a135a6154 CentOS 7 x64
294e1600-6519-4211-ab83-817f5e121fb2 CentOS 6 x64
1457f7f0-f4cb-403a-bb81-2e284cd60546 Windows 2016 Standard
c580730f-a0c8-4eca-92b2-f041ff7312f4 Windows 2016 DataCenter
2576b241-f08d-440a-a37c-43244c919fc5 Windows 2012 R2 Standard
55f24c45-395c-41a5-be71-1d201d099c84 Windows 2012 R2 DataCenter
4a38b79b-9cb9-4dac-8553-52423b1436ec Windows 2008 R2 Enterprise
9e141c8a-d032-4284-9fc6-ad5404ac0093 Windows 2019 Standard
b4f8447d-73bf-4f75-bdf8-656091faed55 Windows Windows 10 x64
083911a7-bcdd-429b-8a2c-78050a8222cf Debian 10 x64
c58d7a46-880f-44dc-915d-63cc0a8689ba Debian 9 x64
802c3c0e-fbb3-4c65-9631-a2ca5ffb0c83 SUSE SLES 15 SP2
26ddcaba-d347-4a16-8fcf-2fc50f41b0cf SUSE OpenSUSE LEAP 15
Khởi tạo Cloud Server
Để khởi tạo một Cloud Server, ta cần các tham số sau:
-
--region
: Region Cloud Server sẽ thực hiện tạo. Hỗ trợ các giá trị:HN
vàHCM
-
--availability-zone
: Availability Zone Cloud Server sẽ thực hiện tạo. Hỗ trợ các giá trị:HN1, HN2
vàHCM1
-
--category
: Dòng của Cloud Server. Hỗ trợ các giá trị: basic, premium, enterprise, dedicated -
--flavor
: Cấu hình RAM và CPU của Cloud Server -
--image-id
: ID của hệ điều hành (image) -
--name
: Tên Cloud Server -
--rootdisk-size
: Kích thước ổ cứng rootdisk -
--rootdisk-type
: Loại ổ cứng của Cloud Server. HDD hoặc SSD -
--ssh-key
(tùy chọn): Tên của SSH key cho Cloud Server -
--snapshot-id
(tùy chọn): Khởi tạo Cloud Server từ một Snapshot -
--volume-id
(tùy chọn): Khởi tạo Cloud Server từ một rootdisk có sẵn
Ví dụ tạo một Cloud Server tại Region HCM, AZ HCM1, dòng basic, cấu hình CPU 2 core 2G RAM, image id 37ce9f3e-a545-4182-948a-e51e7a9e63c0
, kích thước ổ cứng rootdisk 20GB loại SSD
root@ubuntu-huantest:~# bizfly server create --region HCM --availability-zone HCM1 --category premium --flavor 2c_2g --image-id 37ce9f3e-a545-4182-948a-e51e7a9e63c0 --name VCTestHCM --rootdisk-size 20 --rootdisk-type SSD
Using config file: /root/.bizfly.yaml
Creating server with task id: ae58fe82-6a63-490d-a2ff-3f5614d8f4dd
Xóa 1 Cloud Server: bizfly server delete <server id>
Reboot 1 Cloud Server: bizfly server reboot <server id>
Stop 1 Cloud Server: bizfly server stop <server id>
Start 1 Cloud Server: bizfly server start <server id>
Resize 1 Cloud Server: bizfly server resize --flavor <new flavor> <server id>
Danh sách Volume: bizfly volume list
root@ubuntu-huantest:~# bizfly volume list
Using config file: /root/.bizfly.yaml
ID NAME DESCRIPTION STATUS SIZE CREATED AT VOLUME TYPE SNAPSHOT ID BILLING PLAN
32e7b925-852e-4032-b1b0-7ab328c55d67 VCTestHCM_rootdisk in-use 20 2022-11-10T05:00:48.000000 PREMIUM-SSD1 saving_plan
b2e666a3-7f8a-4c76-992a-34d98647e138 pool-bizflycloud-3aswhhiqk5azdpk5-node-ZBqZgWFo_rootdisk in-use 50 2022-10-11T05:03:41.000000 PREMIUM-SSD1 on_demand
5b2650b5-3bb6-4e15-8e5d-ffe6b17874a1 windows-2vcpu-2gb-1-KhangTetBW1_rootdisk in-use 40 2022-05-25T10:02:47.000000 BASIC-HDD1 saving_plan
d26192dd-e5f2-4eed-a2ee-7be3343473a5 windows-2vcpu-2gb-1-KhangTestBW_rootdisk in-use 40 2022-03-31T08:28:15.000000 PREMIUM-HDD1 saving_plan