ArcGIS Server on Amazon EC2 comes preconfigured with some running services and data. These can help you understand how the server works and they're also a good way to verify that your server is running correctly. Let's take a few minutes to look at these items.
- On the desktop of your EC2 instance, click the shortcut titled Services Directory. Each ArcGIS Server has this simple page called a Services Directory that helps you explore what services are available on the server. Application developers (i.e. programmers) can also use the Services Directory to get certain information that is useful when writing code to use ArcGIS Server.
- In your browser's address bar, examine the URL of the SampleWorldCities service. It should look like this: http://localhost:6080/arcgis/rest/services/SampleWorldCities/MapServer?f...
This URL is only useful internally on this instance because it uses the keyword localhost (meaning, "this server"). Also notice that the URL is using ArcGIS Server's default port 6080.
In order to reach this service through the internet, you need to replace localhost:6080 with the address of the Elastic Load Balancer (ELB) that Cloud Builder placed on your site. All incoming traffic comes through the ELB. The ELB forwards web service requests to your individual GIS servers through port 6080.
- Copy the URL that you see in the web browser address bar (localhost and all) and paste it in Notepad on your own computer (not your EC2 instance). We're going to adjust this URL to show how Internet users will access your web services.
- Go back to Cloud Builder and view the Manager URL for your site, just as you did earlier in the lesson. Using Notepad and copy and paste, copy just the portion of the URL that contains the ELB address.
- In the URL to your SampleWorldCities service, replace localhost:6080 with the address of your ELB. Remember that the ELB address contains the site name you defined earlier and that all characters will be in lower case. Your resulting URL should look similar to this, although it will have a unique ELB name:
- Open a web browser on your own home computer desktop.
- In the address bar of the new web browser you just opened, paste the URL you just constructed, and hit Enter.
You should see the SampleWorldCities service. Your computer made a request to ArcGIS Server running on the EC2 instance, somewhere off in Amazon data center land. The instance then sent the image back to your home computer. You have successfully created a public GIS server.
All services are driven by GIS data. With ArcGIS Server, these are the geodatabases, shapefiles, map documents, and so on, that you are accustomed to working with in ArcMap and ArcCatalog. The sample services here are no different. Let's examine some of the data that drives these services. The data is preconfigured on your instance.
- Maximize your remote desktop session again and open Windows Explorer on your instance (click the folder icon in the taskbar).
Notice that you have a C: drive of 100 GB and a D: drive of 50 GB. Cloud Builder sets up these drives when you create your instance. The C: drive is on the instance itself, meaning that your instance has a 60 GB hard drive. Attached to this is another drive of 50 GB that has automatically been attached and configured as D: and has been given the name of "GIS Data".
You might remember that you specified the size of this particular drive (the D drive) when you were in Cloud Builder. The course instructions told you to change the default 100 GB to 50 GB, since we won't be using very large datasets in this course.
This D drive is not technically part of your instance, it is an Amazon Elastic Block Store (EBS) volume that is attached to your instance. In Amazon EC2, you can create many such EBS volumes and attach them to your instances to give yourself more disk space.
EBS volumes have some great advantages. You can create and destroy them at any time, just like instances. But you can also take "snapshots" of your volumes and store them on EC2. This allows you to create multiple "clones" of the hard drive that you might attach to different instances. The snapshots also give you a backup of your data in case your original EBS volume fails (yes, hardware does occasionally fail even in an Amazon data center).
The GIS data is stored on D:, not C:, for a good reason. When you terminate your instance, your C: drive goes away, but the attached EBS volume D: is not deleted immediately. If your instance was terminated prematurely, either by accident or because of some hardware or software failure, you can still get your data back if you have put it on the EBS volume.
Looking in Windows Explorer, you should also see that your own local hard drives are available. These are listed in a fashion like "C on MYMACHINE". This makes it easy to copy and paste data from your local machine onto your instance.
- Minimize your remote desktop session. On your local computer, log in to the AWS Management Console and from the left-hand menu, click Volumes.
You should see the 100 GB volume and the 50 GB volume that are associated with your instance. You are actually charged a storage fee for having these volumes, and you cannot stop the clock on this fee even if you stop your instance. However, the fee for these volumes is relatively small compared to the fee you incur for running your instance.
Now that you've seen what's preconfigured on your server, you'll learn a little more about how you can copy your own data onto the instance and start your own mapping web service.