Revision 52167529 docs/examplesdir/server.rst

b/docs/examplesdir/server.rst
47 47
    f1r57-1m4g3-1d Debian Base Alpha
48 48
    53c0nd-1m4g3-1d Beta Debian Base
49 49

  
50
Let's pick the `C1R128D1drbd` (id: 1) flavor and the `Debian Base Alpha` (id:
50
Pick the `C1R128D1drbd` (id: 1) flavor and the `Debian Base Alpha` (id:
51 51
f1r57-1m4g3-1d) image to create a new virtual server called 'My First Server'
52 52

  
53 53
.. code-block:: console
......
101 101
    <bar showing destruction progress, until 100%>
102 102
    Server 141 is now in DELETED mode
103 103

  
104
Create Servers with networks
105
----------------------------
106

  
107
First, check the available IPs:
108

  
109
.. code-block:: console
110

  
111
    $ kamaki ip list
112
    42042
113
        instance_id: 424242
114
        floating_network_id: 1
115
        fixed_ip_address: None
116
        floating_ip_address: 123.456.78.90
117
        port_id: 24024
118

  
119
So, there is an ip (123.456.78.90) on network 1. We can use it:
120

  
121
.. code-block:: console
122

  
123
    $ kamaki server create --network=1,123.456.78.90 --name='Extrovert Server' --flavor-id=1 --image-id=f1r57-1m4g3-1d
124
    ...
125

  
126
Another case it the connection to a private network (so, no IP):
127

  
128
.. code-block:: console
129

  
130
    $ kamaki network list
131
    1   Public network
132
    7   A custom private network
133
    9   Another custom private network
134

  
135
    $ kamaki server create --network=7 --name='Introvert Server' --flavor-id=1 --image-id=f1r57-1m4g3-1d
136

  
137
.. note:: Multiple *- -network* args will create a corresponding number of
138
    connections (nics) to the specified networks.
139

  
140
.. note:: Ommiting *- -network* will let the cloud apply the default network
141
    policy. To create a server without any connections (nics), use the
142
    *- -no-network argument*
143

  
144

  
104 145
Inject ssh keys to a debian server
105 146
----------------------------------
106 147

  
......
134 175

  
135 176
.. code-block:: console
136 177

  
137
    $ kamaki server create --name='NoPassword Server' --flavor-id=1 --image-id=f1r57-1m4g3-1d -p /home/someuser/.ssh/id_rsa.pub,/root/.ssh/authorized_keys
178
    $ kamaki server create --name='NoPassword Server' --flavor-id=1 --image-id=f1r57-1m4g3-1d \
179
        --network=1,123.456.78.90 \
180
        -p /home/someuser/.ssh/id_rsa.pub,/root/.ssh/authorized_keys
181

  
138 182
    accessIPv4:
139 183
    accessIPv6:
140 184
    addresses:
......
159 203
    updated:         2013-06-19T12:34:48.512867+00:00
160 204
    user_id:         s0m3-u53r-1d
161 205

  
162
When the virtual server is ready, get the virtual servers external IP from the
163
web UI. Let's assume the IP is 123.456.78.90 .
206
When the server is ready, we can connect through the public network 1 and the
207
IP 123.456.78.90 :
164 208

  
165 209
.. code-block:: console
166 210

  

Also available in: Unified diff