Skip to content

Commit 6155647

Browse files
committed
Adds documentation page about using the CLI with CCIs
1 parent a4561c9 commit 6155647

1 file changed

Lines changed: 177 additions & 0 deletions

File tree

docs/cli/cci.rst

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
.. _cci:
2+
3+
Working with Cloud Compute Instances
4+
====================================
5+
Using the SoftLayer portal for ordering Cloud Compute Instances is fine but for a number of reasons it's sometimes to use the command-line. For this, you can use the SoftLayer command-line client to make administrative tasks quicker and easier. This page gives an intro to working with SoftLayer Cloud Compute Instances using the SoftLayer command-line client.
6+
7+
.. note::
8+
9+
The following assumes that the client is already :ref:`configured with valid SoftLayer credentials<cli>`.
10+
11+
12+
First, let's list the current Cloud Compute Instances with `sl cci list`.
13+
::
14+
15+
$ sl cci list
16+
:....:............:......:.......:........:............:............:....................:
17+
: id : datacenter : host : cores : memory : primary_ip : backend_ip : active_transaction :
18+
:....:............:......:.......:........:............:............:....................:
19+
:....:............:......:.......:........:............:............:....................:
20+
21+
We don't have any Cloud Compute Instances! Let's fix that. Before we can create a CCI, we need to know what options are available to me: RAM, CPU, operating systems, disk sizes, disk types, datacenters. Luckily, there's a simple command to do that, `sl cci create-options`.
22+
23+
::
24+
25+
$ sl cci create-options
26+
:.................:..............................................................................................:
27+
: Name : Value :
28+
:.................:..............................................................................................:
29+
: datacenter : ams01,dal01,dal05,sea01,sjc01,sng01,wdc01 :
30+
: cpus (private) : 1,2,4,8 :
31+
: cpus (standard) : 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 :
32+
: memory : 1024,2048,3072,4096,5120,6144,7168,8192,9216,10240,11264,12288,13312,14336,15360,16384,32768 :
33+
: os (CENTOS) : CENTOS_5_32 :
34+
: : CENTOS_5_64 :
35+
: : CENTOS_6_32 :
36+
: : CENTOS_6_64 :
37+
: os (CLOUDLINUX) : CLOUDLINUX_5_32 :
38+
: : CLOUDLINUX_5_64 :
39+
: : CLOUDLINUX_6_32 :
40+
: : CLOUDLINUX_6_64 :
41+
: os (DEBIAN) : DEBIAN_5_32 :
42+
: : DEBIAN_5_64 :
43+
: : DEBIAN_6_32 :
44+
: : DEBIAN_6_64 :
45+
: : DEBIAN_7_32 :
46+
: : DEBIAN_7_64 :
47+
: os (REDHAT) : REDHAT_5_64 :
48+
: : REDHAT_6_32 :
49+
: : REDHAT_6_64 :
50+
: os (UBUNTU) : UBUNTU_10_32 :
51+
: : UBUNTU_10_64 :
52+
: : UBUNTU_12_32 :
53+
: : UBUNTU_12_64 :
54+
: : UBUNTU_8_32 :
55+
: : UBUNTU_8_64 :
56+
: os (VYATTACE) : VYATTACE_6.5_64 :
57+
: os (WIN) : WIN_2003-DC-SP2-1_32 :
58+
: : WIN_2003-DC-SP2-1_64 :
59+
: : WIN_2003-ENT-SP2-5_32 :
60+
: : WIN_2003-ENT-SP2-5_64 :
61+
: : WIN_2003-STD-SP2-5_32 :
62+
: : WIN_2003-STD-SP2-5_64 :
63+
: : WIN_2008-DC-R2_64 :
64+
: : WIN_2008-DC-SP2_32 :
65+
: : WIN_2008-DC-SP2_64 :
66+
: : WIN_2008-ENT-R2_64 :
67+
: : WIN_2008-ENT-SP2_32 :
68+
: : WIN_2008-ENT-SP2_64 :
69+
: : WIN_2008-STD-R2-SP1_64 :
70+
: : WIN_2008-STD-R2_64 :
71+
: : WIN_2008-STD-SP2_32 :
72+
: : WIN_2008-STD-SP2_64 :
73+
: : WIN_2012-DC_64 :
74+
: : WIN_2012-STD_64 :
75+
: : WIN_7-ENT_32 :
76+
: : WIN_7-PRO_32 :
77+
: : WIN_8-ENT_64 :
78+
: local disk(0) : 25,100 :
79+
: local disk(2) : 25,100,150,200,300 :
80+
: san disk(0) : 25,100 :
81+
: san disk(2) : 10,20,25,30,40,50,75,100,125,150,175,200,250,300,350,400,500,750,1000,1500,2000 :
82+
: san disk(3) : 10,20,25,30,40,50,75,100,125,150,175,200,250,300,350,400,500,750,1000,1500,2000 :
83+
: san disk(4) : 10,20,25,30,40,50,75,100,125,150,175,200,250,300,350,400,500,750,1000,1500,2000 :
84+
: san disk(5) : 10,20,25,30,40,50,75,100,125,150,175,200,250,300,350,400,500,750,1000,1500,2000 :
85+
: nic : 10,100,1000 :
86+
:.................:..............................................................................................:
87+
88+
Here's the command to create a 2-core, 1G memory, Ubuntu 12.04 hourly instance in the San Jose datacenter using the command `sl cci create`.
89+
90+
::
91+
92+
$ sl cci create --host=example --domain=softlayer.com -c 2 -m 1024 -o UBUNTU_12_64 --hourly --datacenter sjc01
93+
This action will incur charges on your account. Continue? [y/N]: y
94+
:.........:......................................:
95+
: name : value :
96+
:.........:......................................:
97+
: id : 1234567 :
98+
: created : 2013-06-13T08:29:44-06:00 :
99+
: guid : 6e013cde-a863-46ee-8s9a-f806dba97c89 :
100+
:.........:......................................:
101+
102+
103+
With the last command, the Cloud Compute Instance has begun being created. It should instantly appear in your listing now.
104+
105+
::
106+
107+
$ sl cci list
108+
:.........:............:.......................:.......:........:................:..............:....................:
109+
: id : datacenter : host : cores : memory : primary_ip : backend_ip : active_transaction :
110+
:.........:............:.......................:.......:........:................:..............:....................:
111+
: 1234567 : sjc01 : example.softlayer.com : 2 : 1G : 108.168.200.11 : 10.54.80.200 : Assign Host :
112+
:.........:............:.......................:.......:........:................:..............:....................:
113+
114+
Cool. You may ask "It's creating... but how do I know when it's done?". Well, here's how:
115+
116+
::
117+
118+
$ sl cci ready 'example' --wait=600
119+
READY
120+
121+
When the previous command returns, I know that the Cloud Compute Instance has finished the provisioning process and is ready to use. This is *very* useful for chaining commands together. Now that you have your Cloud Compute Instance, let's get access to it. To do that, use the `sl cci detail` command. From the example below, you can see that the username is 'root' and password is 'ABCDEFGH'.
122+
123+
.. warning::
124+
125+
Be careful when using the `--passwords` flag. This will print the password to the Cloud Compute Instance onto the screen. Make sure no one is looking over your shoulder. It's also advisable to change your root password soon after creating your Cloud Compute Instance.
126+
127+
::
128+
129+
$ sl cci detail example --passwords
130+
:..............:...........................:
131+
: Name : Value :
132+
:..............:...........................:
133+
: id : 1234567 :
134+
: hostname : example.softlayer.com :
135+
: status : Active :
136+
: state : Running :
137+
: datacenter : sjc01 :
138+
: cores : 2 :
139+
: memory : 1G :
140+
: public_ip : 108.168.200.11 :
141+
: private_ip : 10.54.80.200 :
142+
: os : Ubuntu :
143+
: private_only : False :
144+
: private_cpu : False :
145+
: created : 2013-06-13T08:29:44-06:00 :
146+
: modified : 2013-06-13T08:31:57-06:00 :
147+
: users : root ABCDEFGH :
148+
:..............:...........................:
149+
150+
151+
There are many other commands to help manage Cloud Compute Instances. To see them all, use `sl help cci`.
152+
153+
::
154+
155+
$ sl help cci
156+
usage: sl cci [<command>] [<args>...] [options]
157+
158+
Manage, delete, order compute instances
159+
160+
The available commands are:
161+
network Manage network settings
162+
create Order and create a CCI
163+
(see `sl cci create-options` for choices)
164+
manage Manage active CCI
165+
list List CCI's on the account
166+
detail Output details about a CCI
167+
dns DNS related actions to a CCI
168+
cancel Cancel a running CCI
169+
create-options Output available available options when creating a CCI
170+
reload Reload the OS on a CCI based on its current configuration
171+
ready Check if a CCI has finished provisioning
172+
173+
For several commands, <identifier> will be asked for. This can be the id,
174+
hostname or the ip address for a CCI.
175+
176+
Standard Options:
177+
-h --help Show this screen

0 commit comments

Comments
 (0)