/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/developers/ec2-windows.txt

  • Committer: John Arbash Meinel
  • Date: 2009-03-24 16:35:22 UTC
  • mto: This revision was merged to the branch mainline in revision 4198.
  • Revision ID: john@arbash-meinel.com-20090324163522-p0p9s5ahzsnem1oc
A few notes, some updates from ian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
but we aim to use it for the production Windows installer build of 1.13 in
9
9
March.
10
10
 
11
 
See also:
 
11
See also: 
12
12
 
13
13
* `Bazaar Developer Documentation Catalog <index.html>`_.
14
14
 
20
20
=====
21
21
 
22
22
* The instance is only running (and incurring charges) when it's needed
23
 
  for testing or packaging.
24
 
 
 
23
  for testing or packaging.  
 
24
  
25
25
* It can be started or stopped by anyone on the team using a
26
26
  straightforward script.
27
27
 
41
41
========
42
42
 
43
43
The working disk and the AMI images are stored in one person's account for
44
 
billing purposes.
 
44
billing purposes.  
45
45
 
46
46
Ideally we want to give other people access to run this machine without
47
47
giving full access to the account.  I'm not sure if that's feasible.  If
69
69
an administrator for ease of installing software.
70
70
 
71
71
You do need to have an RSA keypair to get the initial password for a
72
 
Windows machine, even though you can't use it to log in later.
73
 
``ec2-get-password`` takes the full path to the private key to obtain the
74
 
password from Amazon, and ``ec2-add-keypair`` creates a named keypair at
75
 
Amazon and returns the private path. One keypair is all that is needed.
76
 
This is distinct from the account identifier - likely due to the different
77
 
toolchains in use (the keypairs are used for unix ssh keys, and I (Robert)
78
 
suspect a rather unix friendly core at Amazon).
79
 
Once a custom image is made with a saved password, you can skip using
80
 
``ec2-get-password`` (which is only needed for Windows anyway).
 
72
Windows machine, even though you can't use it to log in later.  As a quirk
 
73
of the tools(?) ``ec2-get-password`` needs the full path to the keypair
 
74
but ``ec2-add-keypair`` just wants part of the name.  I guess this is
 
75
distinct from the account identifier because the image is relatively
 
76
untrusted(?).  If the password is already set in the image, this shouldn't
 
77
be necessary.
81
78
 
82
79
It would be nice if rdesktop could use private key authentication but
83
80
apparently not.
98
95
* Install the
99
96
  `Amazon EC2 API tools`_ (needs-packaging `bug 330930`_)
100
97
 
101
 
* Create an Amazon Web Services account, sign up for S3 and EC2, and do
102
 
  the various steps to create authentication devices.
103
 
 
104
98
* Create a private key and certificate for yourself.
105
99
  Check these environment variables are set and exported, e.g. by setting
106
100
  them in the file ``~/.aws``.  Make sure the files are private.::
107
101
 
108
 
    export EC2_PRIVATE_KEY=~/.ec2/pk-XXXXXX.pem
109
 
    export EC2_CERT=~/.ec2/cert-XXXXXX.pem
110
 
    export EC2_HOME=~/build/ec2-api-tools-1.3-30349
111
 
    export AWS_SECRET_ACCESS_KEY=XXXXXXXXX
112
 
    export AWS_ACCESS_KEY_ID=XXXXXXXXXXX
113
 
    export EC2_KEYPAIR_NAME=XXXXXXXXX
114
 
    export PATH=$PATH:$EC2_HOME/bin
115
 
    export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
116
 
    ssh-add ~/.ec2/id_rsa
117
 
 
118
 
  You can now '. ~/.aws' to get the ec2 commands available.
119
 
 
120
 
* (Unix images only) run ec2-add-keypair SOMENAME, e.g. 'bzr'. Put the
121
 
  result (minus the first line) somewhere like ~/.ec2/id_rsa and chmod go-rw.
122
 
 
123
 
* A useful Unix image is `ami-bdfe19d4`_, Eric Hammonds 64-bit Ubuntu image.
 
102
    EC2_PRIVATE_KEY=~/.ec2/pk-XXXXXX.pem
 
103
    EC2_CERT=~/.ec2/cert-XXXXXX.pem
 
104
    EC2_HOME=~/build/ec2-api-tools-1.3-30349
 
105
    AWS_SECRET_ACCESS_KEY=XXXXXXXXX
 
106
    AWS_ACCESS_KEY_ID=XXXXXXXXXXX
 
107
    PATH=$PATH:$EC2_HOME/bin
 
108
    JAVA_HOME=/usr/lib/jvm/java-6-openjdk
124
109
 
125
110
* Install the rdesktop client, to actually access the machine.
126
111
 
 
112
* Create an Amazon Web Services account, sign up for S3 and EC2, and do
 
113
  the various steps to create authentication devices 
 
114
 
127
115
* Possibly read some of the `EC2 documentation`_ for background.
128
 
 
129
 
.. _`bug 330930`: https://bugs.edge.launchpad.net/ubuntu/+bug/330930
130
 
.. _`Amazon EC2 API tools`:
 
116
   
 
117
.. _`bug 330930`: https://bugs.edge.launchpad.net/ubuntu/+bug/330930 
 
118
.. _`Amazon EC2 API tools`: 
131
119
     http://developer.amazonwebservices.com/connect/entry.jspa?externalID=368&categoryID=88
132
120
.. _`EC2 documentation`: http://aws.amazon.com/
133
 
.. _`ami-bdfe19d4`:
134
 
   http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1762&categoryID=101
135
121
 
136
122
* Create a security group for your that allows rdesktop access and icmp with::
137
123
 
138
124
    ec2-add-group desolation-group -d 'bzr win32 build machine'
139
125
    ec2-authorize desolation-group -p 3389 -s 1.2.3.4/32
140
126
    ec2-authorize desolation-group -t -1:-1 -P icmp
141
 
 
 
127
  
142
128
  Add your public IP there.  You can repeat that command to allow others
143
129
  in.
144
130
 
149
135
1. Get the right AMI image ID from another developer.
150
136
 
151
137
1. Start the instance::
152
 
 
 
138
   
153
139
     ec2-run-instances $image_id -g desolation-group
154
140
 
155
141
   This will print out some information including the image id, something
156
 
   like ``i-31a74258``.
 
142
   like ``i-31a74258``.  
157
143
 
158
144
1. Actually starting the machine will take a few minutes.  Once it's in
159
145
   the *running* state, get the machine's public IP with ::
171
157
To save a system snapshot as an image
172
158
-------------------------------------
173
159
 
174
 
1. Bundle the current state.  *Doing this will reboot the machine.*
 
160
1. Bundle the current state.  *Doing this will reboot the machine.* 
175
161
   You need to choose a unique s3 bucket name,
176
 
   typically based on a domain or email address, which can contain
 
162
   typically based on a domain or email address, which can contain 
177
163
   any number of images.  You also need a name unique within the bucket
178
 
   for this image, like ``desolation-vs2008-20090219``.  And finally
 
164
   for this image, like ``desolation-vs2008-20090219``.  And finally 
179
165
   it needs your AWS S3 access key and secret key, which should be set in
180
166
   ``~/.aws``::
181
 
 
 
167
    
182
168
      ec2-bundle-instance -b ec2.sourcefrog.net \
183
169
          -p desolation-vs2008-2009021 \
184
170
          -o "$AWS_ACCESS_KEY_ID" \
185
 
          -w "$AWS_SECRET_ACCESS_KEY"
 
171
          -w "$AWS_SECRET_ACCESS_KEY" 
186
172
 
187
173
1.  This will take several minutes:  You can check progress with ::
188
174
 
199
185
      ec2-modify-image-attributes $ami_id -l -a 123412341234
200
186
 
201
187
 
202
 
Management console (useful!)
203
 
----------------------------
204
 
 
205
 
https://console.aws.amazon.com/ec2/home
206
 
 
207
188
..
208
189
   vim: ft=rst tw=74 ai