
For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I15c72f12e55c0f343b4e6c16fb86789244abdc8c
3700 lines
111 KiB
Plaintext
3700 lines
111 KiB
Plaintext
# SOME DESCRIPTIVE TITLE.
|
|
# Copyright (C) 2015, OpenStack contributors
|
|
# This file is distributed under the same license as the FirstApp package.
|
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
#
|
|
#, fuzzy
|
|
msgid ""
|
|
msgstr ""
|
|
"Project-Id-Version: FirstApp 0.1\n"
|
|
"Report-Msgid-Bugs-To: \n"
|
|
"POT-Creation-Date: 2016-01-19 06:04+0000\n"
|
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
"MIME-Version: 1.0\n"
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
#: ../advice.rst:3
|
|
msgid "Advice for developers new to operations"
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:5
|
|
msgid ""
|
|
"This section introduces some operational concepts and tasks to developers "
|
|
"who have not written cloud applications before."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:9
|
|
msgid "Monitoring"
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:11
|
|
msgid ""
|
|
"Monitoring is essential for 'scalable' cloud applications. You must know how "
|
|
"many requests are coming in and the impact that these requests have on "
|
|
"various services. You must have enough information to determine whether to "
|
|
"start another worker or API service as you did in :doc:`/scaling_out`."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:20
|
|
msgid ""
|
|
"In addition to this kind of monitoring, you should consider availability "
|
|
"monitoring. Although your application might not care about a failed worker, "
|
|
"it should care about a failed database server."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:24
|
|
msgid ""
|
|
"Use the `Health Endpoint Monitoring Pattern <https://msdn.microsoft.com/en-"
|
|
"us/library/dn589789.aspx>` to implement functional checks within your "
|
|
"application that external tools can access through exposed endpoints at "
|
|
"regular intervals."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:30
|
|
msgid "Backups"
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:32
|
|
msgid ""
|
|
"Just as you back up information on a non-cloud server, you must back up non-"
|
|
"reproducible information, such as information on a database server, file "
|
|
"server, or in application log files. Just because something is 'in the "
|
|
"cloud' does not mean that the underlying hardware or systems cannot fail."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:38
|
|
msgid ""
|
|
"OpenStack provides a couple of tools that make it easy to back up data. If "
|
|
"your provider runs OpenStack Object Storage, you can use its API calls and "
|
|
"CLI tools to work with archive files."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:42
|
|
msgid ""
|
|
"You can also use the OpenStack API to create snapshots of running instances "
|
|
"and persistent volumes. For more information, see your SDK documentation."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:49
|
|
msgid ""
|
|
"In addition to configuring backups, review your policies about what you back "
|
|
"up and how long to retain each backed up item."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:53
|
|
msgid "Phoenix servers"
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:55
|
|
msgid ""
|
|
"`Phoenix Servers <http://martinfowler.com/bliki/PhoenixServer.html>`_, named "
|
|
"for the mythical bird that is consumed by fire and rises from the ashes to "
|
|
"live again, make it easy to start over with new instances."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:60
|
|
msgid ""
|
|
"Application developers and operators who use phoenix servers have access to "
|
|
"systems that are built from a known baseline, such as a specific operating "
|
|
"system version, and to tooling that automatically builds, installs, and "
|
|
"configures a system."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:65
|
|
msgid ""
|
|
"If you deploy your application on a regular basis, you can resolve outages "
|
|
"and make security updates without manual intervention. If an outage occurs, "
|
|
"you can provision more resources in another region. If you must patch "
|
|
"security holes, you can provision additional compute nodes that are built "
|
|
"with the updated software. Then, you can terminate vulnerable nodes and "
|
|
"automatically fail-over traffic to the new instances."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:74
|
|
msgid "Security"
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:76
|
|
msgid ""
|
|
"If one application instance is compromised, all instances with the same "
|
|
"image and configuration will likely suffer the same vulnerability. The "
|
|
"safest path is to use configuration management to rebuild all instances."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:82
|
|
msgid "Configuration management"
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:84
|
|
msgid ""
|
|
"Configuration management tools, such as Ansible, Chef, and Puppet, enable "
|
|
"you to describe exactly what to install and configure on an instance. Using "
|
|
"these descriptions, these tools implement the changes that are required to "
|
|
"get to the desired state."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:89
|
|
msgid ""
|
|
"These tools vastly reduce the effort it takes to work with large numbers of "
|
|
"servers, and also improve the ability to recreate, update, move, and "
|
|
"distribute applications."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:94
|
|
msgid "Application deployment"
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:96
|
|
msgid ""
|
|
"How do you deploy your application? For example, do you pull the latest code "
|
|
"from a source control repository? Do you make packaged releases that update "
|
|
"infrequently? Do you perform haphazard tests in a development environment "
|
|
"and deploy only after major changes?"
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:101
|
|
msgid ""
|
|
"One of the latest trends in scalable cloud application deployment is "
|
|
"`continuous integration <http://en.wikipedia.org/wiki/"
|
|
"Continuous_integration>`_ and `continuous deployment <http://en.wikipedia."
|
|
"org/wiki/Continuous_delivery>`_ (CI/CD)."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:106
|
|
msgid ""
|
|
"CI/CD means that you always test your application and make frequent "
|
|
"deployments to production."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:109
|
|
msgid ""
|
|
"In this tutorial, we have downloaded the latest version of our application "
|
|
"from source and installed it on a standard image. Our magic installation "
|
|
"script also updates the standard image to have the latest dependencies that "
|
|
"you need to run the application."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:114
|
|
msgid ""
|
|
"Another approach is to create a 'gold' image, which pre-installs your "
|
|
"application and its dependencies. A 'gold' image enables faster boot times "
|
|
"and more control over what is on the instance. However, if you use 'gold' "
|
|
"images, you must have a process in place to ensure that these images do not "
|
|
"fall behind on security updates."
|
|
msgstr ""
|
|
|
|
#: ../advice.rst:121
|
|
msgid "Fail fast"
|
|
msgstr ""
|
|
|
|
#: ../appendix.rst:3
|
|
msgid "Appendix"
|
|
msgstr ""
|
|
|
|
#: ../appendix.rst:6
|
|
msgid "Bootstrap your network"
|
|
msgstr ""
|
|
|
|
#: ../appendix.rst:8
|
|
msgid ""
|
|
"Most cloud providers provision all network objects that are required to boot "
|
|
"an instance. To determine whether these objects were created for you, access "
|
|
"the Network Topology section of the OpenStack dashboard."
|
|
msgstr ""
|
|
|
|
#: ../appendix.rst:21
|
|
msgid "Specify a network during instance build"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:3
|
|
msgid "Block Storage"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:8
|
|
msgid ""
|
|
"By default, data in OpenStack instances is stored on 'ephemeral' disks. "
|
|
"These disks remain with the instance throughout its lifetime. When you "
|
|
"terminate the instance, that storage and all the data stored on it "
|
|
"disappears. Ephemeral storage is allocated to a single instance and cannot "
|
|
"be moved to another instance."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:14
|
|
msgid ""
|
|
"This section introduces block storage, also known as volume storage, which "
|
|
"provides access to persistent storage devices. You interact with block "
|
|
"storage by attaching volumes to running instances just as you might attach a "
|
|
"USB drive to a physical server. You can detach volumes from one instance and "
|
|
"reattach them to another instance and the data remains intact. The OpenStack "
|
|
"Block Storage (cinder) project implements block storage."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:22
|
|
msgid ""
|
|
"Though you might have configured Object Storage to store images, the Fractal "
|
|
"application needs a database to track the location of, and parameters that "
|
|
"were used to create, images in Object Storage. This database server cannot "
|
|
"fail."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:27
|
|
msgid ""
|
|
"If you are an advanced user, think about how you might remove the database "
|
|
"from the architecture and replace it with Object Storage metadata, and then "
|
|
"contribute these steps to :doc:`craziness`."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:31
|
|
msgid ""
|
|
"Otherwise, continue reading to learn how to work with, and move the Fractal "
|
|
"application database server to use, block storage."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:35
|
|
msgid "Basics"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:37
|
|
msgid ""
|
|
"Later on, you will use a Block Storage volume to provide persistent storage "
|
|
"for the database server for the Fractal application. But first, learn how to "
|
|
"create and attach a Block Storage device."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:43 ../durability.rst:70 ../introduction.rst:14
|
|
msgid "This section has not yet been completed for the .NET SDK."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:47
|
|
msgid "This section has not yet been completed for the fog SDK."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:51 ../introduction.rst:22
|
|
msgid "This section has not yet been completed for the jclouds SDK."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:55 ../durability.rst:109 ../introduction.rst:26
|
|
msgid "This section has not yet been completed for the pkgcloud SDK."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:59 ../durability.rst:113 ../networking.rst:56
|
|
msgid "This section has not yet been completed for the OpenStack SDK."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:67
|
|
msgid "Connect to the API endpoint:"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:83
|
|
msgid "To try it out, make a 1GB volume called :test'."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:103
|
|
msgid "The parameter :code:`size` is in gigabytes."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:105
|
|
msgid "To see if the volume creation was successful, list all volumes:"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:125
|
|
msgid "Attach the storage volume to a running instance."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:128
|
|
msgid "Use Block Storage for the Fractal database server"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:130
|
|
msgid ""
|
|
"You need a server for the dedicated database. Use the image, flavor, and "
|
|
"keypair that you used in :doc:`/getting_started` to launch an :code:`app-"
|
|
"database` instance."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:134
|
|
msgid ""
|
|
"You also need a security group to permit access to the database server (for "
|
|
"MySQL, port 3306) from the network:"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:151
|
|
msgid ""
|
|
"Create a volume object by using the unique identifier (UUID) for the volume. "
|
|
"Then, use the server object from the previous code snippet to attach the "
|
|
"volume to it at :code:`/dev/vdb`:"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:169
|
|
msgid "Log in to the server to run the following steps."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:171
|
|
msgid ""
|
|
"Replace :code:`IP_SERVICES` with the IP address of the services instance and "
|
|
"USERNAME to the appropriate user name."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:174
|
|
msgid "Now prepare the empty block device."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:186
|
|
msgid ""
|
|
"Stop the running MySQL database service and move the database files from :"
|
|
"file:`/var/lib/mysql` to the new volume, which is temporarily mounted at :"
|
|
"file:`/mnt/database`."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:195
|
|
msgid ""
|
|
"Sync the file systems and mount the block device that contains the database "
|
|
"files to :file:`/var/lib/mysql`."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:206
|
|
msgid ""
|
|
"Finally, start the stopped MySQL database service and validate that "
|
|
"everything works as expected."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:215
|
|
msgid "Extras"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:217
|
|
msgid ""
|
|
"You can detach the volume and reattach it elsewhere, or use the following "
|
|
"steps to delete the volume."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:221
|
|
msgid "The following operations are destructive and result in data loss."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:223
|
|
msgid "To detach and delete a volume:"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:235
|
|
msgid ""
|
|
":code:`detach_volume` and :code:`destroy_volume` take a volume object, not a "
|
|
"name."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:247
|
|
msgid ""
|
|
"Other features, such as creating volume snapshots, are useful for backups:"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:257
|
|
msgid ""
|
|
"For information about these and other calls, see `libcloud documentation "
|
|
"<http://ci.apache.org/projects/libcloud/docs/compute/drivers/openstack."
|
|
"html>`_."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:261
|
|
msgid "Work with the OpenStack Database service"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:263
|
|
msgid ""
|
|
"Previously, you manually created the database, which is useful for a a "
|
|
"single database that you rarely update. However, the OpenStack :code:`trove` "
|
|
"component provides Database as a Service (DBaaS)."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:267
|
|
msgid ""
|
|
"This OpenStack Database service is not installed in many clouds right now, "
|
|
"but if your cloud supports it, it can make your life a lot easier when "
|
|
"working with databases."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:271
|
|
msgid ""
|
|
"SDKs do not generally support the service yet, but you can use the 'trove' "
|
|
"command-line client to work with it instead."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:274
|
|
msgid ""
|
|
"To install the 'trove' command-line client, see `Install the OpenStack "
|
|
"command-line clients <http://docs.openstack.org/cli-reference/common/"
|
|
"cli_install_openstack_command_line_clients.html#install-the-clients>`_."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:278
|
|
msgid ""
|
|
"To set up environment variables for your cloud in an :file:`openrc.sh` file, "
|
|
"see `Set environment variables using the OpenStack RC file <http://docs."
|
|
"openstack.org/cli-reference/common/"
|
|
"cli_set_environment_variables_using_openstack_rc.html>`_."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:282
|
|
msgid ""
|
|
"Ensure you have an :file:`openrc.sh` file, source it, and validate that your "
|
|
"trove client works: ::"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:297
|
|
msgid ""
|
|
"For information about supported features and how to work with an existing "
|
|
"database service installation, see `Database as a Service in OpenStack "
|
|
"<http://www.slideshare.net/hastexo/hands-on-trove-database-as-a-service-in-"
|
|
"openstack-33588994>`_."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:302 ../craziness.rst:72 ../durability.rst:531
|
|
#: ../getting_started.rst:1390 ../introduction.rst:790 ../networking.rst:797
|
|
#: ../orchestration.rst:482 ../scaling_out.rst:473
|
|
msgid "Next steps"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:304
|
|
msgid ""
|
|
"You should now be fairly confident working with Block Storage volumes. For "
|
|
"information about other calls, see the volume documentation for your SDK. "
|
|
"Or, try one of these tutorial steps:"
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:308 ../durability.rst:548 ../getting_started.rst:1399
|
|
#: ../introduction.rst:806 ../scaling_out.rst:492
|
|
msgid ":doc:`/orchestration`: Automatically orchestrate your application."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:309 ../durability.rst:549 ../getting_started.rst:1400
|
|
#: ../introduction.rst:807 ../orchestration.rst:489 ../scaling_out.rst:493
|
|
msgid ":doc:`/networking`: Learn about complex networking."
|
|
msgstr ""
|
|
|
|
#: ../block_storage.rst:310 ../durability.rst:550 ../getting_started.rst:1401
|
|
#: ../introduction.rst:808 ../networking.rst:803 ../orchestration.rst:490
|
|
#: ../scaling_out.rst:494
|
|
msgid ":doc:`/advice`: Get advice about operations."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:3
|
|
msgid "Going crazy"
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:5
|
|
msgid "This section explores options for expanding the sample application."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:8
|
|
msgid "Regions and geographic diversity"
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:10
|
|
msgid ""
|
|
"For more information about multi-site clouds, see the `Multi-Site chapter "
|
|
"<http://docs.openstack.org/arch-design/multi-site.html>`_ in the "
|
|
"Architecture Design Guide."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:14
|
|
msgid ""
|
|
"OpenStack supports 'regions', which are geographically-separated "
|
|
"installations that are connected to a single service catalog. This section "
|
|
"explains how to expand the Fractal application to use multiple regions for "
|
|
"high availability."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:19 ../craziness.rst:33 ../craziness.rst:40
|
|
#: ../craziness.rst:69
|
|
msgid "This section is incomplete. Please help us finish it!"
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:22
|
|
msgid "Multiple clouds"
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:24
|
|
msgid ""
|
|
"For more information about hybrid clouds, see the `Hybrid Cloud chapter "
|
|
"<http://docs.openstack.org/arch-design/hybrid.html>`_ in the Architecture "
|
|
"Design Guide."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:29
|
|
msgid ""
|
|
"You might want to use multiple clouds, such as a private cloud inside your "
|
|
"organization and a public cloud. This section attempts to do exactly that."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:36
|
|
msgid "High availability"
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:38
|
|
msgid "Using Pacemaker to look at the API."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:43
|
|
msgid "conf.d, etc.d"
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:45
|
|
msgid "Use conf.d and etc.d."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:47
|
|
msgid ""
|
|
"In earlier sections, the Fractal application used an installation script "
|
|
"into which the metadata API passed parameters to bootstrap the cluster. "
|
|
"`Etcd <https://github.com/coreos/etcd>`_ is \"a distributed, consistent key-"
|
|
"value store for shared configuration and service discovery\" that you can "
|
|
"use to store configurations. You can write updated versions of the Fractal "
|
|
"worker component to connect to Etcd or use `Confd <https://github.com/"
|
|
"kelseyhightower/confd>`_ to poll for changes from Etcd and write changes to "
|
|
"a configuration file on the local file system, which the Fractal worker can "
|
|
"use for configuration."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:58
|
|
msgid "Use Object Storage instead of a database"
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:60
|
|
msgid ""
|
|
"We have not quite figured out how to stop using a database, but the general "
|
|
"steps are:"
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:63
|
|
msgid ""
|
|
"Change the Fractal upload code to store metadata with the object in Object "
|
|
"Storage."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:66
|
|
msgid ""
|
|
"Change the API code, such as \"list fractals,\" to query Object Storage to "
|
|
"get the metadata."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:74
|
|
msgid ""
|
|
"Wow! If you have made it through this section, you know more than the "
|
|
"authors of this guide know about working with OpenStack clouds."
|
|
msgstr ""
|
|
|
|
#: ../craziness.rst:77
|
|
msgid ""
|
|
"Perhaps you can `contribute <http://docs.openstack.org/contributor-guide/>`_?"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:3
|
|
msgid "Make it durable"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:14
|
|
msgid "This section introduces object storage."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:16
|
|
msgid ""
|
|
"`OpenStack Object Storage <http://www.openstack.org/software/openstack-"
|
|
"storage/>`_ (code-named swift) is open-source software that enables you to "
|
|
"create redundant, scalable data storage by using clusters of standardized "
|
|
"servers to store petabytes of accessible data. It is a long-term storage "
|
|
"system for large amounts of static data that you can retrieve, leverage, and "
|
|
"update. Unlike more traditional storage systems that you access through a "
|
|
"file system, you access Object Storage through an API."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:24
|
|
msgid "The Object Storage API is organized around objects and containers."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:26
|
|
msgid ""
|
|
"Similar to the UNIX programming model, an object, such as a document or an "
|
|
"image, is a \"bag of bytes\" that contains data. You use containers to group "
|
|
"objects. You can place many objects inside a container, and your account can "
|
|
"have many containers."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:31
|
|
msgid ""
|
|
"If you think about how you traditionally make what you store durable, you "
|
|
"quickly conclude that keeping multiple copies of your objects on separate "
|
|
"systems is a good way strategy. However, keeping track of those multiple "
|
|
"copies is difficult, and building that into an app requires complicated "
|
|
"logic."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:36
|
|
msgid ""
|
|
"OpenStack Object Storage automatically replicates each object at least twice "
|
|
"before returning 'write success' to your API call. A good strategy is to "
|
|
"keep three copies of objects, by default, at all times, replicating them "
|
|
"across the system in case of hardware failure, maintenance, network outage, "
|
|
"or another kind of breakage. This strategy is very convenient for app "
|
|
"creation. You can just dump objects into object storage and not worry about "
|
|
"the additional work that it takes to keep them safe."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:46
|
|
msgid "Use Object Storage to store fractals"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:48
|
|
msgid ""
|
|
"The Fractals app currently uses the local file system on the instance to "
|
|
"store the images that it generates. For a number of reasons, this approach "
|
|
"is not scalable or durable."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:52
|
|
msgid ""
|
|
"Because the local file system is ephemeral storage, the fractal images are "
|
|
"lost along with the instance when the instance is terminated. Block-based "
|
|
"storage, which the :doc:`/block_storage` section discusses, avoids that "
|
|
"problem, but like local file systems, it requires administration to ensure "
|
|
"that it does not fill up, and immediate attention if disks fail."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:58
|
|
msgid ""
|
|
"The Object Storage service manages many of the tasks normally managed by the "
|
|
"application owner. The Object Storage service provides a scalable and "
|
|
"durable API that you can use for the fractals app, eliminating the need to "
|
|
"be aware of the low level details of how objects are stored and replicated, "
|
|
"and how to grow the storage pool. Object Storage handles replication for "
|
|
"you. It stores multiple copies of each object. You can use the Object "
|
|
"Storage API to return an object, on demand."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:66
|
|
msgid "First, learn how to connect to the Object Storage endpoint:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:94
|
|
msgid ""
|
|
"Libcloud 0.16 and 0.17 are afflicted with a bug that means authentication to "
|
|
"a swift endpoint can fail with `a Python exception <https://issues.apache."
|
|
"org/jira/browse/LIBCLOUD-635>`_. If you encounter this, you can upgrade your "
|
|
"libcloud version, or apply a simple `2-line patch <https://github.com/"
|
|
"fifieldt/libcloud/commit/ec58868c3344a9bfe7a0166fc31c0548ed22ea87>`_."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:102
|
|
msgid ""
|
|
"Libcloud uses a different connector for Object Storage to all other "
|
|
"OpenStack services, so a conn object from previous sections will not work "
|
|
"here and we have to create a new one named :code:`swift`."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:121
|
|
msgid ""
|
|
"To begin to store objects, we must first make a container. Call yours :code:"
|
|
"`fractals`:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:130 ../durability.rst:149 ../durability.rst:164
|
|
#: ../durability.rst:183
|
|
msgid "You should see output such as:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:155
|
|
msgid ""
|
|
"You should now be able to see this container appear in a listing of all "
|
|
"containers in your account:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:189
|
|
msgid ""
|
|
"The next logical step is to upload an object. Find a photo of a goat on "
|
|
"line, name it :code:`goat.jpg`, and upload it to your :code:`fractals` "
|
|
"container:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:212
|
|
msgid ""
|
|
"List objects in your :code:`fractals` container to see if the upload was "
|
|
"successful. Then, download the file to verify that the md5sum is the same:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:305
|
|
msgid "Finally, clean up by deleting the test object:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:326
|
|
msgid "You must pass in objects and not object names to the delete commands."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:328
|
|
msgid "Now, no more objects are available in the :code:`fractals` container."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:339
|
|
msgid "Back up the Fractals from the database on the Object Storage"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:341
|
|
msgid ""
|
|
"Back up the Fractals app images, which are currently stored inside the "
|
|
"database, on Object Storage."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:344
|
|
msgid "Place the images in the :code:`fractals` container:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:365
|
|
msgid ""
|
|
"Next, back up all existing fractals from the database to the swift "
|
|
"container. A simple loop takes care of that:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:368 ../durability.rst:395
|
|
msgid "Replace :code:`IP_API_1` with the IP address of the API instance."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:397
|
|
msgid ""
|
|
"The example code uses the awesome `Requests library <http://docs.python-"
|
|
"requests.org/en/latest/>`_. Before you try to run the previous script, make "
|
|
"sure that it is installed on your system."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:404
|
|
msgid "Configure the Fractals app to use Object Storage"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:406
|
|
msgid ""
|
|
"Currently, you cannot directly store generated images in OpenStack Object "
|
|
"Storage. Please revisit this section again in the future."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:411
|
|
msgid "Extra features"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:414
|
|
msgid "Delete containers"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:416
|
|
msgid ""
|
|
"To delete a container, you must first remove all objects from the container. "
|
|
"Otherwise, the delete operation fails:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:438
|
|
msgid "It is not possible to restore deleted objects. Be careful."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:441
|
|
msgid "Add metadata to objects"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:443
|
|
msgid ""
|
|
"You can complete advanced tasks such as uploading an object with metadata, "
|
|
"as shown in following example. For more information, see the documentation "
|
|
"for your SDK."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:449 ../durability.rst:467
|
|
msgid ""
|
|
"This option also uses a bit stream to upload the file, iterating bit by bit "
|
|
"over the file and passing those bits to Object Storage as they come. "
|
|
"Compared to loading the entire file in memory and then sending it, this "
|
|
"method is more efficient, especially for larger files."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:479
|
|
msgid "Large objects"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:481
|
|
msgid ""
|
|
"For efficiency, most Object Storage installations treat large objects, :code:"
|
|
"`> 5GB`, differently than smaller objects."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:492
|
|
msgid ""
|
|
"If you work with large objects, use the :code:`RegionScopedBlobStoreContext` "
|
|
"class family instead of the ones used so far."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:495
|
|
msgid ""
|
|
"Large file uploads that use the :code:`openstack-swift` provider are "
|
|
"supported in only jclouds V2, currently in beta. Also, the default chunk "
|
|
"size is 64 Mb. Consider changing this as homework."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:506
|
|
msgid ""
|
|
"If you work with large objects, use the :code:`ex_multipart_upload_object` "
|
|
"call instead of the simpler :code:`upload_object` call. The call splits the "
|
|
"large object into chunks and creates a manifest so that the chunks can be "
|
|
"recombined on download. Change the :code:`chunk_size` parameter, in bytes, "
|
|
"to a value that your cloud can accept."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:519 ../getting_started.rst:1407 ../introduction.rst:812
|
|
#: ../scaling_out.rst:498
|
|
msgid "Complete code sample"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:521
|
|
msgid ""
|
|
"This file contains all the code from this tutorial section. This class lets "
|
|
"you view and run the code."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:524
|
|
msgid ""
|
|
"Before you run this class, confirm that you have configured it for your "
|
|
"cloud and the instance running the Fractals application."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:533
|
|
msgid ""
|
|
"You should now be fairly confident working with Object Storage. You can find "
|
|
"more information about the Object Storage SDK calls at:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:538
|
|
msgid ""
|
|
"https://github.com/fog/fog/blob/master/lib/fog/openstack/docs/storage.md"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:542
|
|
msgid "https://libcloud.readthedocs.org/en/latest/storage/api.html"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:544
|
|
msgid "Or, try one of these tutorial steps:"
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:546 ../getting_started.rst:1397 ../introduction.rst:804
|
|
#: ../scaling_out.rst:490
|
|
msgid ""
|
|
":doc:`/block_storage`: Migrate the database to block storage, or use the "
|
|
"database-as-a-service component."
|
|
msgstr ""
|
|
|
|
#: ../durability.rst:551 ../getting_started.rst:1402 ../introduction.rst:809
|
|
#: ../networking.rst:804 ../orchestration.rst:491 ../scaling_out.rst:495
|
|
msgid ""
|
|
":doc:`/craziness`: Learn some crazy things that you might not think to do ;)"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:0
|
|
msgid "OpenStack SDKs"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:3
|
|
msgid "Getting started"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:6
|
|
msgid "Who should read this guide"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:8
|
|
msgid ""
|
|
"This guide is for experienced software developers who want to deploy "
|
|
"applications to OpenStack clouds."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:11
|
|
msgid ""
|
|
"If you are familiar with OpenStack but have not created a cloud application "
|
|
"in general or an OpenStack application in particular, this section teaches "
|
|
"you how to program with OpenStack components."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:16
|
|
msgid "What you will learn"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:18
|
|
msgid ""
|
|
"Deploying applications in a cloud environment can be very different from "
|
|
"deploying them in a traditional IT environment. This guide teaches you how "
|
|
"to deploy applications on OpenStack and some best practices for cloud "
|
|
"application development."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:24
|
|
msgid "A general overview"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:26
|
|
msgid ""
|
|
"This tutorial shows two applications. The first application is a simple "
|
|
"fractal generator that uses mathematical equations to generate beautiful "
|
|
"`fractal images <http://en.wikipedia.org/wiki/Fractal>`_. We show you this "
|
|
"application in its entirety so that you can compare it to a second, more "
|
|
"robust, application."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:32
|
|
msgid "The second application is an OpenStack application that enables you to:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:34
|
|
msgid ""
|
|
"Create and delete compute resources. These resources are virtual machine "
|
|
"instances where the Fractals application runs."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:36
|
|
msgid ""
|
|
"Make cloud-related architecture decisions such as turning functions into "
|
|
"micro-services and modularizing them."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:38
|
|
msgid "Scale available resources up and down."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:39
|
|
msgid "Use Object and Block storage for file and database persistence."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:40
|
|
msgid "Use Orchestration services to automatically adjust to the environment."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:41
|
|
msgid "Customize networking for better performance and segregation."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:42
|
|
msgid "Explore and apply advanced OpenStack cloud features."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:45
|
|
msgid "Choose your OpenStack SDK"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:47
|
|
msgid ""
|
|
"Anyone with a programming background can easily read the code in this guide. "
|
|
"Although this guide focuses on a particular SDK, you can use other languages "
|
|
"and toolkits with the OpenStack cloud:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:56
|
|
msgid "Language"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:57
|
|
msgid "Name"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:58 ../introduction.rst:579 ../introduction.rst:655
|
|
msgid "Description"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:59
|
|
msgid "URL"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:60 ../getting_started.rst:65
|
|
#: ../getting_started.rst:69
|
|
msgid "Python"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:61
|
|
msgid "`Libcloud <https://libcloud.apache.org>`_"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:62
|
|
msgid ""
|
|
"A Python-based library that the Apache Foundation manages. Use it to work "
|
|
"with multiple cloud types."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:64
|
|
msgid ""
|
|
"https://libcloud.readthedocs.org/en/latest/compute/drivers/openstack.html"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:66
|
|
msgid "OpenStack SDK"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:67
|
|
msgid "A Python-based library for OpenStack."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:68
|
|
msgid "http://git.openstack.org/cgit/openstack/python-openstacksdk"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:70
|
|
msgid "Shade"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:71
|
|
msgid ""
|
|
"A Python-based library developed by OpenStack Infra team. Use it to operate "
|
|
"multiple OpenStack clouds."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:73
|
|
msgid "http://git.openstack.org/cgit/openstack-infra/shade"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:74
|
|
msgid "Java"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:75
|
|
msgid "`jClouds <https://jclouds.apache.org>`_"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:76
|
|
msgid ""
|
|
"A Java-based library that the Apache Foundation manages. Use it to work with "
|
|
"multiple cloud types."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:78
|
|
msgid "https://jclouds.apache.org/guides/openstack/"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:79
|
|
msgid "Ruby"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:80
|
|
msgid "`fog <http://fog.io/>`_"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:81
|
|
msgid "A Ruby-based SDK. Use it to work with multiple clouds."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:83
|
|
msgid ""
|
|
"https://github.com/fog/fog/blob/master/lib/fog/openstack/docs/"
|
|
"getting_started.md"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:84
|
|
msgid "node.js"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:85
|
|
msgid "`pkgcloud <https://github.com/pkgcloud/pkgcloud>`_"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:86
|
|
msgid "A Node.js-based SDK. Use it work with multiple clouds."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:88
|
|
msgid ""
|
|
"https://github.com/pkgcloud/pkgcloud/tree/master/docs/providers/openstack"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:89
|
|
msgid "PHP"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:90
|
|
msgid "`php-opencloud <http://php-opencloud.com/>`_"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:91
|
|
msgid ""
|
|
"A PHP-based library. Use it to write PHP code that works with OpenStack "
|
|
"clouds."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:93
|
|
msgid ""
|
|
"http://php-opencloud.readthedocs.org/en/latest/getting-started-with-"
|
|
"openstack.html"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:94
|
|
msgid ".NET Framework"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:95
|
|
msgid "OpenStack SDK for Microsoft .NET"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:96
|
|
msgid ""
|
|
"A .NET-based library. Use it to write C++ or C# code for Microsoft "
|
|
"applications."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:98
|
|
msgid "https://www.nuget.org/packages/openstack.net"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:100
|
|
msgid ""
|
|
"For a list of available SDKs, see `Software Development Kits <https://wiki."
|
|
"openstack.org/wiki/SDKs>`_."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:102
|
|
msgid ""
|
|
"Other versions of this guide show you how to use the other SDKs and "
|
|
"languages to complete these tasks. If you are a developer for another "
|
|
"toolkit that you would like this guide to include, feel free to submit code "
|
|
"snippets. For more information, contact `OpenStack Documentation team "
|
|
"<https://wiki.openstack.org/Documentation>`_ members."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:109
|
|
msgid "What you need"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:111
|
|
msgid ""
|
|
"We assume that you can already access an OpenStack cloud. You must have a "
|
|
"project, also known as a tenant, with a minimum quota of six instances. "
|
|
"Because the Fractals application runs in Ubuntu, Debian, Fedora-based, and "
|
|
"openSUSE-based distributions, you must create instances that use one of "
|
|
"these operating systems."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:117
|
|
msgid "To interact with the cloud, you must also have"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:121
|
|
msgid ""
|
|
"`OpenStack Cloud SDK for Microsoft .NET 1.4.0.1 or later installed <https://"
|
|
"www.nuget.org/packages/openstack.net>`_."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:126
|
|
msgid ""
|
|
"To install the OpenStack .NET SDK, use the NeGet Package Manager that is "
|
|
"included with Visual Studio and Xamarin Studio. You simply add a package "
|
|
"named 'openstack.net' and the NeGet Package Manager automatically installs "
|
|
"the necessary dependencies."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:133
|
|
msgid "This document has not yet been completed for the .NET SDK."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:137
|
|
msgid ""
|
|
"`fog 1.19 or higher installed <http://www.fogproject.org/wiki/index.php?"
|
|
"title=FOGUserGuide#Installing_FOG>`_ and working with ruby gems 1.9."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:143
|
|
msgid "This document has not yet been completed for the fog SDK."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:147
|
|
msgid ""
|
|
"`jClouds 1.8 or higher installed <https://jclouds.apache.org/start/"
|
|
"install>`_."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:151
|
|
msgid "This document has not yet been completed for the jclouds SDK."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:155
|
|
msgid ""
|
|
"`libcloud 0.15.1 or higher installed <https://libcloud.apache.org/getting-"
|
|
"started.html>`_."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:160
|
|
msgid ""
|
|
"`pkgcloud 1.2 or higher installed <https://github.com/pkgcloud/"
|
|
"pkgcloud#getting-started>`_."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:167
|
|
msgid ""
|
|
"a recent version of `openstacksdk <http://python-openstacksdk.readthedocs."
|
|
"org/en/latest/users/index.html>`_ installed."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:180
|
|
msgid ""
|
|
"`a recent version of shade library installed <https://pypi.python.org/pypi/"
|
|
"shade/0.11.0>`_."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:182
|
|
msgid "Before proceeding, install the latest version of shade."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:184
|
|
msgid "Obtain the following information from your cloud provider:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:186
|
|
msgid "auth URL"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:187
|
|
msgid "user name"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:188
|
|
msgid "password"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:189
|
|
msgid "project ID or name (projects are also known as tenants)"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:190
|
|
msgid "cloud region"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:192
|
|
msgid ""
|
|
"You can also download the OpenStack RC file from the OpenStack Horizon "
|
|
"dashboard. Log in to the dashboard and click :guilabel:`Project->Access & "
|
|
"Security->API Access->Download OpenStack RC file`. If you use this method, "
|
|
"be aware that the \"auth URL\" does not include the path. For example, if "
|
|
"your :file:`openrc.sh` file shows:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:202
|
|
msgid "The actual auth URL is:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:209
|
|
msgid "How you interact with OpenStack"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:211
|
|
msgid ""
|
|
"In this tutorial, you interact with your OpenStack cloud through the SDK "
|
|
"that you chose in \"Choose your OpenStack SDK.\" This guide assumes that you "
|
|
"know how to run code snippets in your language of choice."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:224
|
|
msgid ""
|
|
"To try it, add the following code to a Python script (or use an interactive "
|
|
"Python shell) by calling :code:`python -i`."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:233
|
|
msgid ""
|
|
"To try it out, add the following code to a Python script (or use an "
|
|
"interactive Python shell) by calling :code:`python -i`."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:242
|
|
msgid ""
|
|
"To try it, use an interactive Node.js shell by calling :code:`node` or add "
|
|
"the following code to a script."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:251
|
|
msgid ""
|
|
"To use the OpenStack .NET SDK, add the following code in the required "
|
|
"namespace section."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:260
|
|
msgid ""
|
|
"Because all service endpoints use the Identity Service for authentication "
|
|
"and authorization, place the following code in the 'void Main()' entry-point "
|
|
"function."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:271
|
|
msgid ""
|
|
"Because the tutorial reuses the :code:`conn` object, make sure that you "
|
|
"always have one handy."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:276
|
|
msgid ""
|
|
"If you receive the :code:`libcloud.common.types.InvalidCredsError: 'Invalid "
|
|
"credentials with the provider'` exception when you run one of these API "
|
|
"calls, double-check your credentials."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:281
|
|
msgid ""
|
|
"If your provider does not support regions, try a blank string ('') for the "
|
|
"`region_name`."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:286
|
|
msgid ""
|
|
"Use your credentials above to specify the cloud provider name, user name, "
|
|
"password, project_name and region_name in the file :file:`~/.config/"
|
|
"openstack/clouds.yml`."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:293
|
|
msgid ""
|
|
"If you do use a public cloud `known by shade <http://git.openstack.org/cgit/"
|
|
"openstack/os-client-config/tree/os_client_config/vendors>`_, you can avoid "
|
|
"specifying :code:`auth_url:` and instead specify :code:`profile: "
|
|
"$PROVIDER_NAME` in the clouds.yml file."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:304
|
|
msgid ""
|
|
"If you receive the exception :code:`openstack.exceptions.HttpException: "
|
|
"HttpException: 401 Client Error: Unauthorized,` while trying to run one of "
|
|
"the following API calls please double-check your credentials."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:311
|
|
msgid "Flavors and images"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:313
|
|
msgid ""
|
|
"To run your application, you must launch an instance. This instance serves "
|
|
"as a virtual machine."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:316
|
|
msgid ""
|
|
"To launch an instance, you choose a flavor and an image. The flavor "
|
|
"represents the size of the instance, including the number of CPUs and amount "
|
|
"of RAM and disk space. An image is a prepared OS installation from which you "
|
|
"clone your instance. When you boot instances in a public cloud, larger "
|
|
"flavors can be more expensive than smaller ones in terms of resources and "
|
|
"monetary cost."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:322
|
|
msgid ""
|
|
"To list the images that are available in your cloud, run some API calls:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:337 ../getting_started.rst:350
|
|
#: ../getting_started.rst:375 ../getting_started.rst:391
|
|
#: ../getting_started.rst:444 ../getting_started.rst:460
|
|
#: ../getting_started.rst:485 ../getting_started.rst:504
|
|
#: ../getting_started.rst:581 ../getting_started.rst:593
|
|
#: ../getting_started.rst:611 ../getting_started.rst:623
|
|
#: ../getting_started.rst:674 ../getting_started.rst:686
|
|
#: ../getting_started.rst:705 ../getting_started.rst:720
|
|
#: ../getting_started.rst:789 ../getting_started.rst:813
|
|
#: ../getting_started.rst:827
|
|
msgid "This code returns output like this:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:421 ../getting_started.rst:536
|
|
#: ../getting_started.rst:653 ../getting_started.rst:752
|
|
msgid "You should see output something like this:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:429
|
|
msgid "You can also get information about available flavors:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:549
|
|
msgid "Your images and flavors will be different, of course."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:551
|
|
msgid ""
|
|
"Choose an image and flavor for your instance. You need about 1GB RAM, 1 CPU, "
|
|
"and a 1GB disk. This example uses the Ubuntu image with a small flavor, "
|
|
"which is a safe choice. In subsequent tutorial sections in this guide, you "
|
|
"must change the image and flavor IDs to correspond to the image and flavor "
|
|
"that you choose."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:557
|
|
msgid ""
|
|
"If the image that you want is not available in your cloud, you can usually "
|
|
"upload one depending on the policy settings of your cloud. For information "
|
|
"about how to upload images, see `obtaining images <http://docs.openstack.org/"
|
|
"image-guide/obtain-images.html>`_."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:562
|
|
msgid ""
|
|
"Set the image and size variables to appropriate values for your cloud. We "
|
|
"will use these variables in later sections."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:565
|
|
msgid ""
|
|
"First, tell the connection to get a specified image by using the ID of the "
|
|
"image that you picked in the previous section:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:659
|
|
msgid "Next, tell the script which flavor you want to use:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:713
|
|
msgid ""
|
|
"Because shade accepts either the ID or name in most API calls, specify the "
|
|
"name for the flavor:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:758
|
|
msgid "Now, you can launch the instance."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:761
|
|
msgid "Launch an instance"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:763
|
|
msgid "Use your selected image and flavor to create an instance."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:765
|
|
msgid ""
|
|
"The following instance creation example assumes that you have a single-"
|
|
"tenant network. If you receive the 'Exception: 400 Bad Request Multiple "
|
|
"possible networks found, use a Network ID to be more specific' error, you "
|
|
"have multiple-tenant networks. You must add a `networks` parameter to the "
|
|
"call that creates the server. See :doc:`/appendix` for details."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:772
|
|
msgid "Create the instance."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:774
|
|
msgid "Your SDK might call an instance a 'node' or 'server'."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:801
|
|
msgid "You should see output something like:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:839
|
|
msgid "If you list existing instances:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:881
|
|
msgid "The new instance appears."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:985
|
|
msgid "Before you continue, you must do one more thing."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:988
|
|
msgid "Destroy an instance"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:990
|
|
msgid ""
|
|
"Cloud resources, such as running instances that you no longer use, can cost "
|
|
"money. To avoid unexpected expenses, destroy cloud resources."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1032
|
|
msgid "If you list the instances again, the instance disappears."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1034
|
|
msgid ""
|
|
"Leave your shell open to use it for another instance deployment in this "
|
|
"section."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1038
|
|
msgid "Deploy the application to a new instance"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1040
|
|
msgid ""
|
|
"Now that you know how to create and delete instances, you can deploy the "
|
|
"sample application. The instance that you create for the application is "
|
|
"similar to the first instance that you created, but this time, we introduce "
|
|
"a few extra concepts."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1045
|
|
msgid ""
|
|
"Internet connectivity from your cloud instance is required to download the "
|
|
"application."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1048
|
|
msgid ""
|
|
"When you create an instance for the application, you want to give it a bit "
|
|
"more information than you supplied to the bare instance that you just "
|
|
"created and deleted. We will go into more detail in later sections, but for "
|
|
"now, simply create the following resources so that you can feed them to the "
|
|
"instance:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1054
|
|
msgid ""
|
|
"A key pair. To access your instance, you must import an SSH public key into "
|
|
"OpenStack to create a key pair. OpenStack installs this key pair on the new "
|
|
"instance. Typically, your public key is written to :code:`.ssh/id_rsa.pub`. "
|
|
"If you do not have an SSH public key file, follow `these instructions "
|
|
"<https://help.github.com/articles/generating-ssh- keys/>`_ first. We will "
|
|
"cover these instructions in depth in :doc:`/introduction`."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1061
|
|
msgid ""
|
|
"In the following example, set :code:`pub_key_file` to the location of your "
|
|
"public SSH key file."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1104
|
|
msgid ""
|
|
"Network access. By default, OpenStack filters all traffic. You must create a "
|
|
"security group and apply it to your instance. The security group allows HTTP "
|
|
"and SSH access. We will go into more detail in :doc:`/introduction`."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1139
|
|
msgid ""
|
|
"Userdata. During instance creation, you can provide userdata to OpenStack to "
|
|
"configure instances after they boot. The cloud-init service applies the user "
|
|
"data to an instance. You must pre-install the cloud-init service on your "
|
|
"chosen image. We will go into more detail in :doc:`/introduction`."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1171
|
|
msgid "User data in openstacksdk must be encoded to Base64"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1177
|
|
msgid "Now, you can boot and configure the instance."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1180
|
|
msgid "Boot and configure an instance"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1182
|
|
msgid ""
|
|
"Use the image, flavor, key pair, and userdata to create an instance. After "
|
|
"you request the instance, wait for it to build."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1206
|
|
msgid "The shade framework can select and assign a free floating IP quickly"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1218
|
|
msgid ""
|
|
"When the instance boots, the `ex_userdata` variable value instructs the "
|
|
"instance to deploy the Fractals application."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1222
|
|
msgid "Associate a floating IP for external connectivity"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1224
|
|
msgid "We cover networking in detail in :doc:`/networking`."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1226
|
|
msgid ""
|
|
"To see the application running, you must know where to look for it. By "
|
|
"default, your instance has outbound network access. To make your instance "
|
|
"reachable from the Internet, you need an IP address. By default in some "
|
|
"cases, your instance is provisioned with a publicly rout-able IP address. In "
|
|
"this case, you see an IP address listed under `public_ips` or `private_ips` "
|
|
"when you list the instances. If not, you must create and attach a floating "
|
|
"IP address to your instance."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1242
|
|
msgid "This gets an IP address that you can assign to your instance:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1251
|
|
msgid "To see whether a private IP address is assigned to your instance:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1257
|
|
msgid ""
|
|
"If one is assigned, users can use this address to access the instance on "
|
|
"some OpenStack clouds."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1260
|
|
msgid "To determine whether a public IP address is assigned to your instance:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1266
|
|
msgid "If one is assigned, users can use this address to access the instance."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1268
|
|
msgid "To create a floating IP address to use with your instance:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1270
|
|
msgid ""
|
|
"Use :code:`ex_list_floating_ip_pools()` and select the first floating IP "
|
|
"address pool. Allocate this pool to your project and use it to get a "
|
|
"floating IP address."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1278 ../getting_started.rst:1300
|
|
#: ../getting_started.rst:1330
|
|
msgid "This code returns the floating IP address:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1292
|
|
msgid ""
|
|
"Use :code:`getFloatingIps` to check for unused addresses. Select the first "
|
|
"available address. Otherwise, use :code:`allocateNewFloatingIp` to allocate "
|
|
"a floating IP to your project from the default address pool."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1306
|
|
msgid "Attach the floating IP address to the instance:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1320
|
|
msgid ""
|
|
"For this example, we take a floating IP pool from the 'public' network, "
|
|
"which is your external network."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1323
|
|
msgid ""
|
|
"List all available floating IPs for this project and select the first free "
|
|
"one. Allocate a new floating IP if none is available."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1336
|
|
msgid "You can then attach it to the instance:"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1343
|
|
msgid "Run the script to start the deployment."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1346
|
|
msgid "Access the application"
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1348
|
|
msgid ""
|
|
"Deploying application data and configuration to the instance can take some "
|
|
"time. Consider enjoying a cup of coffee while you wait. After the "
|
|
"application deploys, you can use your preferred browser to visit the awesome "
|
|
"graphic interface at the following link."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1379
|
|
msgid ""
|
|
"If you do not use floating IP addresses, substitute another IP address, as "
|
|
"appropriate."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1392
|
|
msgid ""
|
|
"Do not worry if these concepts are not yet completely clear. In :doc:`/"
|
|
"introduction`, we explore these concepts in more detail."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1395
|
|
msgid ":doc:`/scaling_out`: Learn how to scale your application."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1396
|
|
msgid ""
|
|
":doc:`/durability`: Learn how to use Object Storage to make your application "
|
|
"durable."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1409 ../introduction.rst:814
|
|
msgid ""
|
|
"The following file contains all of the code from this section of the "
|
|
"tutorial. This comprehensive code sample lets you view and run the code as a "
|
|
"single script."
|
|
msgstr ""
|
|
|
|
#: ../getting_started.rst:1413 ../introduction.rst:818 ../scaling_out.rst:504
|
|
msgid ""
|
|
"Before you run this script, confirm that you have set your authentication "
|
|
"information, the flavor ID, and image ID."
|
|
msgstr ""
|
|
|
|
#: ../index.rst:3
|
|
msgid "Writing your first OpenStack application"
|
|
msgstr ""
|
|
|
|
#: ../index.rst:6
|
|
msgid "Contents"
|
|
msgstr ""
|
|
|
|
#: ../index.rst:27
|
|
msgid "Search in this guide"
|
|
msgstr ""
|
|
|
|
#: ../index.rst:29
|
|
msgid ":ref:`search`"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:3
|
|
msgid "Introduction to the fractals application architecture"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:5
|
|
msgid ""
|
|
"This section introduces the application architecture and explains how it was "
|
|
"designed to take advantage of cloud features in general and OpenStack in "
|
|
"particular. It also describes some commands in the previous section."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:35
|
|
msgid "Cloud application architecture principles"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:37
|
|
msgid ""
|
|
"Cloud applications typically share several design principles. These "
|
|
"principles influenced the design of the Fractals application."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:45
|
|
msgid "Modularity and micro-services"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:47
|
|
msgid ""
|
|
"`Micro-services <http://en.wikipedia.org/wiki/Microservices>`_ are an "
|
|
"important design pattern that helps achieve application modularity. "
|
|
"Separating logical application functions into independent services "
|
|
"simplifies maintenance and re-use. Decoupling components also makes it "
|
|
"easier to selectively scale individual components, as required. Further, "
|
|
"application modularity is a required feature of applications that scale out "
|
|
"well and are fault tolerant."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:55
|
|
msgid "Scalability"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:57
|
|
msgid ""
|
|
"Cloud applications often use many small instances rather than a few large "
|
|
"instances. Provided that an application is sufficiently modular, you can "
|
|
"easily distribute micro-services across as many instances as required. This "
|
|
"architecture enables an application to grow past the limit imposed by the "
|
|
"maximum size of an instance. It is like trying to move a large number of "
|
|
"people from one place to another; there is only so many people you can put "
|
|
"on the largest bus, but you can use an unlimited number of buses or small "
|
|
"cars, which provide just the capacity you need - and no more."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:67
|
|
msgid "Fault tolerance"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:69
|
|
msgid ""
|
|
"In cloud programming, there is a well-known analogy known as \"cattle vs pets"
|
|
"\". If you have not heard it before, it goes like this:"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:72
|
|
msgid ""
|
|
"When you deal with pets, you name and care for them. If they get sick, you "
|
|
"nurse them back to health, which can be difficult and very time consuming. "
|
|
"When you deal with cattle, you attach a numbered tag to their ear. If they "
|
|
"get sick, you put them down and move on."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:77
|
|
msgid ""
|
|
"That, as it happens, is the new reality of programming. Applications and "
|
|
"systems used to be created on large, expensive servers, cared for by "
|
|
"operations staff dedicated to keeping them healthy. If something went wrong "
|
|
"with one of those servers, the staff's job was to do whatever it took to "
|
|
"make it right again and save the server and the application."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:84
|
|
msgid ""
|
|
"In cloud programming, it is very different. Rather than large, expensive "
|
|
"servers, you have virtual machines that are disposable; if something goes "
|
|
"wrong, you shut the server down and spin up a new one. There is still "
|
|
"operations staff, but rather than nursing individual servers back to health, "
|
|
"their job is to monitor the health of the overall system."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:91
|
|
msgid ""
|
|
"There are definite advantages to this architecture. It is easy to get a \"new"
|
|
"\" server, without any of the issues that inevitably arise when a server has "
|
|
"been up and running for months, or even years."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:95
|
|
msgid ""
|
|
"As with classical infrastructure, failures of the underpinning cloud "
|
|
"infrastructure (hardware, networks, and software) are unavoidable. When you "
|
|
"design for the cloud, it is crucial that your application is designed for an "
|
|
"environment where failures can happen at any moment. This may sound like a "
|
|
"liability, but it is not; by designing your application with a high degree "
|
|
"of fault tolerance, you also make it resilient, and more adaptable, in the "
|
|
"face of change."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:103
|
|
msgid "Fault tolerance is essential to the cloud-based application."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:106
|
|
msgid "Automation"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:108
|
|
msgid ""
|
|
"If an application is meant to automatically scale up and down to meet "
|
|
"demand, it is not feasible have any manual steps in the process of deploying "
|
|
"any component of the application. Automation also decreases the time to "
|
|
"recovery for your application in the event of component failures, increasing "
|
|
"fault tolerance and resilience."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:115
|
|
msgid "Programmatic interfaces (APIs)"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:117
|
|
msgid ""
|
|
"Like many cloud applications, the Fractals application has a `RESTful API "
|
|
"<http://en.wikipedia.org/wiki/Representational_state_transfer>`_. You can "
|
|
"connect to it directly and generate fractals, or you can integrate it as a "
|
|
"component of a larger application. Any time a standard interface such as an "
|
|
"API is available, automated testing becomes much more feasible, increasing "
|
|
"software quality."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:125
|
|
msgid "Fractals application architecture"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:127
|
|
msgid ""
|
|
"The Fractals application was designed with the principles of the previous "
|
|
"subsection in mind. You will note that in :doc:`getting_started`, we "
|
|
"deployed the application in an all-in-one style, on a single virtual "
|
|
"machine. This is not a good practice, but because the application uses micro-"
|
|
"services to decouple logical application functions, we can change this "
|
|
"easily."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:135
|
|
msgid ""
|
|
"Message queues are used to facilitate communication between the Fractal "
|
|
"application services. The Fractal application uses a `work queue <https://"
|
|
"www.rabbitmq.com/tutorials/tutorial-two-python.html>`_ (or task queue) to "
|
|
"distribute tasks to the worker services."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:140
|
|
msgid ""
|
|
"Message queues work in a way similar to a queue (or a line, for those of us "
|
|
"on the other side of the ocean) in a bank being served by multiple clerks. "
|
|
"The message queue in our application provides a feed of work requests that "
|
|
"can be taken one-at-a-time by worker services, whether there is a single "
|
|
"worker service or hundreds of them."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:146
|
|
msgid ""
|
|
"This is a `useful pattern <https://msdn.microsoft.com/en-us/library/dn568101."
|
|
"aspx>`_ for many cloud applications that have long lists of requests coming "
|
|
"in and a pool of resources from which to service them. This also means that "
|
|
"a worker may crash and the tasks will be processed by other workers."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:151
|
|
msgid ""
|
|
"The `RabbitMQ getting started tutorial <https://www.rabbitmq.com/getstarted."
|
|
"html>`_ provides a great introduction to message queues."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:157
|
|
msgid ""
|
|
"The worker service consumes messages from the work queue and then processes "
|
|
"them to create the corresponding fractal image file."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:160
|
|
msgid ""
|
|
"Of course there is also a web interface which offers a more human friendly "
|
|
"way of accessing the API to view the created fractal images, and a simple "
|
|
"command line interface."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:172
|
|
msgid ""
|
|
"There are also multiple storage back ends (to store the generated fractal "
|
|
"images) and a database component (to store the state of tasks), but we will "
|
|
"talk about those in :doc:`/durability` and :doc:`/block_storage` "
|
|
"respectively."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:178
|
|
msgid "How the Fractals application interacts with OpenStack"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:191
|
|
msgid "The magic revisited"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:193
|
|
msgid ""
|
|
"So what exactly was that request doing at the end of the previous section? "
|
|
"Let us look at it again. In this subsection, we are just explaining what you "
|
|
"have already done in the previous section; you do not need to run these "
|
|
"commands again."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:223
|
|
msgid ""
|
|
"We explained image and flavor in :doc:`getting_started`, so in the following "
|
|
"sections, we will explain the other parameters in detail, including :code:"
|
|
"`ex_userdata` (cloud-init) and :code:`ex_keyname` (key pairs)."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:229
|
|
msgid ""
|
|
"In openstacksdk parameter :code:`ex_userdata` is called :code:`user_data` "
|
|
"and parameter :code:`ex_keyname` is called :code:`key_name`."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:234
|
|
msgid "Introduction to cloud-init"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:236
|
|
msgid ""
|
|
"`cloud-init <https://cloudinit.readthedocs.org/en/latest/>`_ is a tool that "
|
|
"performs instance configuration tasks during the boot of a cloud instance, "
|
|
"and comes installed on most cloud images. :code:`ex_userdata`, which was "
|
|
"passed to :code:`create_node`, is the configuration data passed to cloud-"
|
|
"init."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:242
|
|
msgid ""
|
|
"In this case, we are presenting a shell script as the `userdata <https://"
|
|
"cloudinit.readthedocs.org/en/latest/topics/format.html#user-data-script>`_. "
|
|
"When :code:`create_node` creates the instance, :code:`cloud-init` executes "
|
|
"the shell script in the :code:`userdata` variable."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:247
|
|
msgid ""
|
|
"When an SSH public key is provided during instance creation, cloud-init "
|
|
"installs this key on a user account. (The user name varies between cloud "
|
|
"images.) See the `Obtaining Images <http://docs.openstack.org/image-guide/"
|
|
"obtain-images.html>`_ section of the image guide for guidance about which "
|
|
"user name you should use when SSHing. If you still have problems logging in, "
|
|
"ask your cloud provider to confirm the user name."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:279
|
|
msgid "User data in openstacksdk must be encoded to Base64."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:281
|
|
msgid ""
|
|
"After the instance is created, cloud-init downloads and runs a script "
|
|
"called :code:`install.sh`. This script installs the Fractals application. "
|
|
"Cloud-init can consume bash scripts and a number of different types of data. "
|
|
"You can even provide multiple types of data. You can find more information "
|
|
"about cloud-init in the `official documentation <https://cloudinit."
|
|
"readthedocs.org/en/latest/>`_."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:288
|
|
msgid "Introduction to key pairs"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:290
|
|
msgid ""
|
|
"Security is important when it comes to your instances; you can not have just "
|
|
"anyone accessing them. To enable logging into an instance, you must provide "
|
|
"the public key of an SSH key pair during instance creation. In section one, "
|
|
"you created and uploaded a key pair to OpenStack, and cloud-init installed "
|
|
"it for the user account."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:296
|
|
msgid ""
|
|
"Even with a key in place, however, you must have the appropriate security "
|
|
"group rules in place to access your instance."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:300
|
|
msgid "Introduction to security groups"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:302
|
|
msgid ""
|
|
"Security groups are sets of network access rules that are applied to an "
|
|
"instance's networking. By default, only egress (outbound) traffic is "
|
|
"allowed. You must explicitly enable ingress (inbound) network access by "
|
|
"creating a security group rule."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:307
|
|
msgid ""
|
|
"Removing the egress rule created by OpenStack will cause your instance "
|
|
"networking to break."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:310
|
|
msgid ""
|
|
"Start by creating a security group for the all-in-one instance and adding "
|
|
"the appropriate rules, such as HTTP (TCP port 80) and SSH (TCP port 22):"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:333
|
|
msgid ""
|
|
":code:`ex_create_security_group_rule()` takes ranges of ports as input. This "
|
|
"is why ports 80 and 22 are passed twice."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:343
|
|
msgid "You can list available security groups with:"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:370
|
|
msgid "Once you have created a rule or group, you can also delete it:"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:397
|
|
msgid "To see which security groups apply to an instance, you can:"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:426
|
|
msgid ""
|
|
"Once you have configured permissions, you must know where to access the "
|
|
"application."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:430
|
|
msgid "Introduction to Floating IPs"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:432
|
|
msgid ""
|
|
"As in traditional IT, cloud instances are accessed through IP addresses that "
|
|
"OpenStack assigns. How this is actually done depends on the networking setup "
|
|
"for your cloud. In some cases, you will simply get an Internet rout-able IP "
|
|
"address assigned directly to your instance."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:437
|
|
msgid ""
|
|
"The most common way for OpenStack clouds to allocate Internet rout-able IP "
|
|
"addresses to instances, however, is through the use of floating IPs. A "
|
|
"floating IP is an address that exists as an entity unto itself, and can be "
|
|
"associated to a specific instance network interface. When a floating IP "
|
|
"address is associated to an instance network interface, OpenStack re-directs "
|
|
"traffic bound for that address to the address of the instance's internal "
|
|
"network interface address. Your cloud provider will generally offer pools of "
|
|
"floating IPs for your use."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:447
|
|
msgid ""
|
|
"To use a floating IP, you must first allocate an IP to your project, then "
|
|
"associate it to your instance's network interface."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:452
|
|
msgid ""
|
|
"Allocating a floating IP address to an instance does not change the IP "
|
|
"address of the instance, it causes OpenStack to establish the network "
|
|
"translation rules to allow an *additional* IP address."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:462 ../introduction.rst:484
|
|
msgid ""
|
|
"If you have no free floating IPs that have been previously allocated for "
|
|
"your project, first select a floating IP pool offered by your provider. In "
|
|
"this example, we have selected the first one and assume that it has "
|
|
"available IP addresses."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:471 ../introduction.rst:493
|
|
msgid ""
|
|
"Now request that an address from this pool be allocated to your project."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:512
|
|
msgid ""
|
|
"If you have no free floating IPs that have been allocated for your project, "
|
|
"first select a network which offer allocation of floating IPs. In this "
|
|
"example we use network which is called :code:`public`."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:521
|
|
msgid ""
|
|
"Now request an address from this network to be allocated to your project."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:527
|
|
msgid ""
|
|
"Now that you have an unused floating IP address allocated to your project, "
|
|
"attach it to an instance."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:555
|
|
msgid ""
|
|
"That brings us to where we ended up at the end of :doc:`/getting_started`. "
|
|
"But where do we go from here?"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:559
|
|
msgid "Splitting services across multiple instances"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:561
|
|
msgid ""
|
|
"We have talked about separating functions into different micro-services, and "
|
|
"how that enables us to make use of the cloud architecture. Now let us see "
|
|
"that in action."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:565
|
|
msgid ""
|
|
"The rest of this tutorial will not reference the all-in-one instance you "
|
|
"created in section one. Take a moment to delete this instance."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:568
|
|
msgid ""
|
|
"It is easy to split out services into multiple instances. We will create a "
|
|
"controller instance called :code:`app-controller`, which hosts the API, "
|
|
"database, and messaging services. We will also create a worker instance "
|
|
"called :code:`app-worker-1`, which just generates fractals."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:574
|
|
msgid ""
|
|
"The first step is to start the controller instance. The instance has the API "
|
|
"service, the database, and the messaging service, as you can see from the "
|
|
"parameters passed to the installation script."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:579 ../introduction.rst:655
|
|
msgid "Parameter"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:579
|
|
msgid "Values"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:581
|
|
msgid ":code:`-i`"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:581
|
|
msgid ""
|
|
":code:`messaging` (install RabbitMQ) and :code:`faafo` (install the Faafo "
|
|
"app)."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:581
|
|
msgid "Install a service"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:582
|
|
msgid ":code:`-r`"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:582
|
|
msgid ""
|
|
":code:`api` (enable and start the API service), :code:`worker` (enable and "
|
|
"start the worker service), and :code:`demo` (run the demo mode to request "
|
|
"random fractals)."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:582
|
|
msgid "Enable/start something"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:613
|
|
msgid ""
|
|
"Note that this time, when you create a security group, you include a rule "
|
|
"that applies to only instances that are part of the worker group."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:616
|
|
msgid "Next, start a second instance, which will be the worker instance:"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:645
|
|
msgid ""
|
|
"Notice that you have added this instance to the worker_group, so it can "
|
|
"access the controller."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:648
|
|
msgid ""
|
|
"As you can see from the parameters passed to the installation script, you "
|
|
"define this instance as the worker instance. But, you also pass the address "
|
|
"of the API instance and the message queue so the worker can pick up "
|
|
"requests. The Fractals application installation script accepts several "
|
|
"parameters."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:655
|
|
msgid "Example"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:657
|
|
msgid ":code:`-e`"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:657
|
|
msgid "The endpoint URL of the API service."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:657
|
|
msgid "http://localhost/"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:658
|
|
msgid ":code:`-m`"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:658
|
|
msgid "The transport URL of the messaging service."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:658
|
|
msgid "amqp://guest:guest@localhost:5672/"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:659
|
|
msgid ":code:`-d`"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:659
|
|
msgid "The connection URL for the database (not used here)."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:659
|
|
msgid "sqlite:////tmp/sqlite.db"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:662
|
|
msgid ""
|
|
"Now if you make a request for a new fractal, you connect to the controller "
|
|
"instance, :code:`app-controller`, but the work will actually be performed by "
|
|
"a separate worker instance - :code:`app-worker-1`."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:668
|
|
msgid "Login with SSH and use the Fractal app"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:670
|
|
msgid ""
|
|
"Login to the worker instance, :code:`app-worker-1`, with SSH, using the "
|
|
"previous added SSH key pair \"demokey\". Start by getting the IP address of "
|
|
"the worker:"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:699
|
|
msgid "Now you can SSH into the instance:"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:705
|
|
msgid ""
|
|
"Replace :code:`IP_WORKER_1` with the IP address of the worker instance and "
|
|
"USERNAME to the appropriate user name."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:708
|
|
msgid ""
|
|
"Once you have logged in, check to see whether the worker service process is "
|
|
"running as expected. You can find the logs of the worker service in the "
|
|
"directory :code:`/var/log/supervisor/`."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:717
|
|
msgid ""
|
|
"Open :code:`top` to monitor the CPU usage of the :code:`faafo-worker` "
|
|
"process."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:719
|
|
msgid ""
|
|
"Now log into the controller instance, :code:`app-controller`, also with SSH, "
|
|
"using the previously added SSH key pair \"demokey\"."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:726
|
|
msgid ""
|
|
"Replace :code:`IP_CONTROLLER` with the IP address of the controller instance "
|
|
"and USERNAME to the appropriate user name."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:729
|
|
msgid ""
|
|
"Check to see whether the API service process is running like expected. You "
|
|
"can find the logs for the API service in the directory :file:`/var/log/"
|
|
"supervisor/`."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:738
|
|
msgid ""
|
|
"Now call the Fractal application's command line interface (:code:`faafo`) to "
|
|
"request a few new fractals. The following command requests a few fractals "
|
|
"with random parameters:"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:747
|
|
msgid ""
|
|
"Watch :code:`top` on the worker instance. Right after calling :code:`faafo` "
|
|
"the :code:`faafo-worker` process should start consuming a lot of CPU cycles."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:756
|
|
msgid ""
|
|
"To show the details of a specific fractal use the subcommand :code:`show` of "
|
|
"the Faafo CLI."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:777
|
|
msgid ""
|
|
"There are more commands available; find out more details about them with :"
|
|
"code:`faafo get --help`, :code:`faafo list --help`, and :code:`faafo delete "
|
|
"--help`."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:781
|
|
msgid ""
|
|
"The application stores the generated fractal images directly in the database "
|
|
"used by the API service instance. Storing image files in a database is not "
|
|
"good practice. We are doing it here as an example only as an easy way to "
|
|
"enable multiple instances to have access to the data. For best practice, we "
|
|
"recommend storing objects in Object Storage, which is covered in :doc:"
|
|
"`durability`."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:792
|
|
msgid ""
|
|
"You should now have a basic understanding of the architecture of cloud-based "
|
|
"applications. In addition, you have had practice starting new instances, "
|
|
"automatically configuring them at boot, and even modularizing an application "
|
|
"so that you may use multiple instances to run it. These are the basic steps "
|
|
"for requesting and using compute resources in order to run your application "
|
|
"on an OpenStack cloud."
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:800
|
|
msgid ""
|
|
"From here, go to :doc:`/scaling_out` to learn how to further scale your "
|
|
"application. Or, try one of these steps in the tutorial:"
|
|
msgstr ""
|
|
|
|
#: ../introduction.rst:803
|
|
msgid ""
|
|
":doc:`/durability`: Learn how to use Object Storage to make your application "
|
|
"more durable."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:3
|
|
msgid "Networking"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:8
|
|
msgid ""
|
|
"In previous chapters, all nodes that comprise the fractal application were "
|
|
"attached to the same network."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:11
|
|
msgid ""
|
|
"This chapter introduces the Networking API. This will enable us to build "
|
|
"networking topologies that separate public traffic accessing the application "
|
|
"from traffic between the API and the worker components. We also introduce "
|
|
"load balancing for resilience, and create a secure back-end network for "
|
|
"communication between the database, web server, file storage, and worker "
|
|
"components."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:18
|
|
msgid ""
|
|
"This section assumes that your cloud provider has implemented the OpenStack "
|
|
"Networking API (neutron). Users of clouds which have implemented legacy "
|
|
"networking (nova-network) will have access to networking via the Compute "
|
|
"API. Log in to the Horizon dashboard and navigate to :guilabel:`Project-"
|
|
">Access & Security->API Access`. If you see a service endpoint for the "
|
|
"Network API, your cloud is most likely running the Networking API. If you "
|
|
"are still in doubt, ask your cloud provider for more information."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:29
|
|
msgid "This section has not yet been completed for the .NET SDK"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:33
|
|
msgid ""
|
|
"fog `supports <http://www.rubydoc.info/gems/fog/1.8.0/Fog/Network/"
|
|
"OpenStack>`_ the OpenStack Networking API, but this section has not yet been "
|
|
"completed."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:40
|
|
msgid ""
|
|
"jClouds supports the OpenStack Networking API, but section has not yet been "
|
|
"completed. Please see `this <https://gist.github.com/everett-"
|
|
"toews/8701756>`_ in the meantime."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:47
|
|
msgid "Libcloud does not support the OpenStack Networking API."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:51
|
|
msgid ""
|
|
"Pkgcloud supports the OpenStack Networking API, but this section has not "
|
|
"been completed."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:64
|
|
msgid "Work with the CLI"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:66
|
|
msgid ""
|
|
"Because the SDKs do not fully support the OpenStack Networking API, this "
|
|
"section uses the command-line clients."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:69
|
|
msgid ""
|
|
"Use this guide to install the 'neutron' command-line client: http://docs."
|
|
"openstack.org/cli-reference/common/"
|
|
"cli_install_openstack_command_line_clients.html#install-the-clients"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:72 ../orchestration.rst:51
|
|
msgid ""
|
|
"Use this guide to set up the necessary variables for your cloud in an "
|
|
"'openrc' file: http://docs.openstack.org/cli-reference/common/"
|
|
"cli_set_environment_variables_using_openstack_rc.html"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:76
|
|
msgid ""
|
|
"Ensure you have an openrc.sh file, source it, and then check that your "
|
|
"neutron client works: ::"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:92
|
|
msgid "Networking segmentation"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:94
|
|
msgid ""
|
|
"In traditional data centers, network segments are dedicated to specific "
|
|
"types of network traffic."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:97
|
|
msgid ""
|
|
"The fractal application we are building contains these types of network "
|
|
"traffic:"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:100
|
|
msgid "public-facing web traffic"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:101
|
|
msgid "API traffic"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:102
|
|
msgid "internal worker traffic"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:104
|
|
msgid ""
|
|
"For performance reasons, it makes sense to have a network for each tier, so "
|
|
"that traffic from one tier does not \"crowd out\" other types of traffic and "
|
|
"cause the application to fail. In addition, having separate networks makes "
|
|
"controlling access to parts of the application easier to manage, improving "
|
|
"the overall security of the application."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:110
|
|
msgid ""
|
|
"Prior to this section, the network layout for the Fractal application would "
|
|
"be similar to the following diagram:"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:133
|
|
msgid ""
|
|
"In this network layout, we assume that the OpenStack cloud in which you have "
|
|
"been building your application has a public network and tenant router that "
|
|
"was previously created by your cloud provider or by yourself, following the "
|
|
"instructions in the appendix."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:138
|
|
msgid ""
|
|
"Many of the network concepts that are discussed in this section are already "
|
|
"present in the diagram above. A tenant router provides routing and external "
|
|
"access for the worker nodes, and floating IP addresses are associated with "
|
|
"each node in the Fractal application cluster to facilitate external access."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:144
|
|
msgid ""
|
|
"At the end of this section, you make some slight changes to the networking "
|
|
"topology by using the OpenStack Networking API to create the 10.0.1.0/24 "
|
|
"network to which the worker nodes attach. You use the 10.0.3.0/24 API "
|
|
"network to attach the Fractal API servers. Web server instances have their "
|
|
"own 10.0.2.0/24 network, which is accessible by fractal aficionados "
|
|
"worldwide, by allocating floating IPs from the public network."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:183
|
|
msgid "Introduction to tenant networking"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:185
|
|
msgid ""
|
|
"With the OpenStack Networking API, the workflow for creating a network "
|
|
"topology that separates the public-facing Fractals app API from the worker "
|
|
"back end is as follows:"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:189
|
|
msgid "Create a network and subnet for the web server nodes."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:191
|
|
msgid ""
|
|
"Create a network and subnet for the worker nodes. This is the private data "
|
|
"network."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:193
|
|
msgid "Create a router for the private data network."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:195
|
|
msgid "Allocate floating ips and assign them to the web server nodes."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:198
|
|
msgid "Create networks"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:200
|
|
msgid ""
|
|
"Most cloud providers make a public network accessible to you. We will attach "
|
|
"a router to this public network to grant Internet access to our instances. "
|
|
"After also attaching this router to our internal networks, we will allocate "
|
|
"floating IPs from the public network for instances which need to be accessed "
|
|
"from the Internet."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:206
|
|
msgid ""
|
|
"Confirm that we have a public network by listing the networks our tenant has "
|
|
"access to. The public network does not have to be named public - it could be "
|
|
"'external', 'net04_ext' or something else - the important thing is it exists "
|
|
"and can be used to reach the Internet."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:221
|
|
msgid "Next, create a network and subnet for the workers."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:260
|
|
msgid "Now, create a network and subnet for the web servers."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:300
|
|
msgid "Next, create a network and subnet for the API servers."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:340
|
|
msgid ""
|
|
"Now that you have got the networks created, go ahead and create two Floating "
|
|
"IPs, for web servers. Ensure that you replace 'public' with the name of the "
|
|
"public/external network offered by your cloud provider."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:376
|
|
msgid ""
|
|
"The world is running out of IPv4 addresses. If you get the \"No more IP "
|
|
"addresses available on network\" error, contact your cloud administrator. "
|
|
"You may also want to ask about IPv6 :)"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:383
|
|
msgid "Connecting to the Internet"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:385
|
|
msgid ""
|
|
"Most instances require access to the Internet. The instances in your "
|
|
"Fractals app are no exception! Add routers to pass traffic between the "
|
|
"various networks that you use."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:405
|
|
msgid ""
|
|
"Specify an external gateway for your router to tell OpenStack which network "
|
|
"to use for Internet access."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:428
|
|
msgid "Now, attach your router to the worker, API, and web server subnets."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:442
|
|
msgid "Booting a worker"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:444
|
|
msgid ""
|
|
"Now that you have prepared the networking infrastructure, you can go ahead "
|
|
"and boot an instance on it. Ensure you use appropriate flavor and image "
|
|
"values for your cloud - see :doc:`getting_started` if you have not already."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:487
|
|
msgid "Load balancing"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:489
|
|
msgid ""
|
|
"After separating the Fractal worker nodes into their own networks, the next "
|
|
"logical step is to move the Fractal API service to a load balancer, so that "
|
|
"multiple API workers can handle requests. By using a load balancer, the API "
|
|
"service can be scaled out in a similar fashion to the worker nodes."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:496
|
|
msgid "Neutron LbaaS API"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:498
|
|
msgid ""
|
|
"This section is based on the Neutron LBaaS API version 1.0 http://docs."
|
|
"openstack.org/admin-guide-cloud/networking_adv-features.html#basic-load-"
|
|
"balancer-as-a-service-operations"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:505
|
|
msgid ""
|
|
"The OpenStack Networking API provides support for creating loadbalancers, "
|
|
"which can be used to scale the Fractal app web service. In the following "
|
|
"example, we create two compute instances via the Compute API, then "
|
|
"instantiate a load balancer that will use a virtual IP (VIP) for accessing "
|
|
"the web service offered by the two compute nodes. The end result will be the "
|
|
"following network topology:"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:530
|
|
msgid ""
|
|
"libcloud support added 0.14: https://developer.rackspace.com/blog/libcloud-0-"
|
|
"dot-14-released/"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:533
|
|
msgid "Start by looking at what is already in place."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:545
|
|
msgid "Go ahead and create two instances."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:581
|
|
msgid "Confirm that they were added:"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:593
|
|
msgid "Look at which ports are available:"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:607
|
|
msgid ""
|
|
"Next, create additional floating IPs. Specify the fixed IP addresses they "
|
|
"should point to and the ports that they should use:"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:641
|
|
msgid ""
|
|
"You are ready to create members for the load balancer pool, which reference "
|
|
"the floating IPs:"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:678
|
|
msgid "You should be able to see them in the member list:"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:690
|
|
msgid ""
|
|
"Now, create a health monitor that will ensure that members of the load "
|
|
"balancer pool are active and able to respond to requests. If a member in the "
|
|
"pool dies or is unresponsive, the member is removed from the pool so that "
|
|
"client requests are routed to another active member."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:717
|
|
msgid ""
|
|
"Now create a virtual IP that will be used to direct traffic between the "
|
|
"various members of the pool:"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:744
|
|
msgid "And confirm it is in place:"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:755
|
|
msgid "Now, look at the big picture."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:758
|
|
msgid "Final result"
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:760
|
|
msgid ""
|
|
"With the addition of the load balancer, the Fractal app's networking "
|
|
"topology now reflects the modular nature of the application itself."
|
|
msgstr ""
|
|
|
|
#: ../networking.rst:799
|
|
msgid ""
|
|
"You should now be fairly confident working with the Network API. To see "
|
|
"calls that we did not cover, see the volume documentation of your SDK, or "
|
|
"try one of these tutorial steps:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:3
|
|
msgid "Orchestration"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:5
|
|
msgid ""
|
|
"This chapter explains the importance of durability and scalability for your "
|
|
"cloud-based applications. In most cases, really achieving these qualities "
|
|
"means automating tasks such as scaling and other operational tasks."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:10
|
|
msgid ""
|
|
"The Orchestration module provides a template-based way to describe a cloud "
|
|
"application, then coordinates running the needed OpenStack API calls to run "
|
|
"cloud applications. The templates enable you to create most OpenStack "
|
|
"resource types, such as instances, networking information, volumes, security "
|
|
"groups, and even users. It also provides more advanced functionality, such "
|
|
"as instance high availability, instance auto-scaling, and nested stacks."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:18
|
|
msgid ""
|
|
"The OpenStack Orchestration API uses the stacks, resources, and templates "
|
|
"constructs."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:21
|
|
msgid ""
|
|
"You create stacks from templates, which contain resources. Resources are an "
|
|
"abstraction in the HOT (Heat Orchestration Template) template language, "
|
|
"which enables you to define different cloud resources by setting the :code:"
|
|
"`type` attribute."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:26
|
|
msgid ""
|
|
"For example, you might use the Orchestration API to create two compute "
|
|
"instances by creating a stack and by passing a template to the Orchestration "
|
|
"API. That template contains two resources with the :code:`type` attribute "
|
|
"set to :code:`OS::Nova::Server`."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:31
|
|
msgid ""
|
|
"That example is simplistic, of course, but the flexibility of the resource "
|
|
"object enables the creation of templates that contain all the required cloud "
|
|
"infrastructure to run an application, such as load balancers, block storage "
|
|
"volumes, compute instances, networking topology, and security policies."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:36
|
|
msgid ""
|
|
"The Orchestration module is not deployed by default in every cloud. If these "
|
|
"commands do not work, it means the Orchestration API is not available; ask "
|
|
"your support team for assistance."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:40
|
|
msgid ""
|
|
"This section introduces the `HOT templating language <http://docs.openstack."
|
|
"org/developer/heat/template_guide/hot_guide.html>`_, and takes you through "
|
|
"some common OpenStack Orchestration calls."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:44
|
|
msgid ""
|
|
"In previous sections, you used your SDK to programatically interact with "
|
|
"OpenStack. In this section, you use the 'heat' command-line client to access "
|
|
"the Orchestration API directly through template files."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:48
|
|
msgid ""
|
|
"Install the 'heat' command-line client by following this guide: http://docs."
|
|
"openstack.org/cli-reference/common/"
|
|
"cli_install_openstack_command_line_clients.html#install-the-clients"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:57
|
|
msgid "the .NET SDK does not currently support OpenStack Orchestration."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:61
|
|
msgid ""
|
|
"fog `does support OpenStack Orchestration <https://github.com/fog/fog/tree/"
|
|
"master/lib/fog/openstack/models/orchestration>`_."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:66
|
|
msgid ""
|
|
"Jclouds does not currently support OpenStack Orchestration. See this `bug "
|
|
"report <https://issues.apache.org/jira/browse/JCLOUDS-693>`_."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:71
|
|
msgid "libcloud does not currently support OpenStack Orchestration."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:75
|
|
msgid ""
|
|
"Pkgcloud supports OpenStack Orchestration :D:D:D but this section is `not "
|
|
"written yet <https://github.com/pkgcloud/pkgcloud/blob/master/docs/providers/"
|
|
"openstack/orchestration.md>`_"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:80
|
|
msgid "The OpenStack SDK does not currently support OpenStack Orchestration."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:87
|
|
msgid "HOT templating language"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:89
|
|
msgid ""
|
|
"To learn about the template syntax for OpenStack Orchestration, how to "
|
|
"create basic templates, and their inputs and outputs, see `Heat "
|
|
"Orchestration Template (HOT) Guide <http://docs.openstack.org/developer/heat/"
|
|
"template_guide/hot_guide.html>`_."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:94
|
|
msgid "Work with stacks: Basics"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:96
|
|
msgid "**Stack create**"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:98
|
|
msgid ""
|
|
"The `hello_faafo <https://git.openstack.org/cgit/openstack/api-site/plain/"
|
|
"firstapp/samples/heat/hello_faafo.yaml>`_ Hot template demonstrates how to "
|
|
"create a compute instance that builds and runs the Fractal application as an "
|
|
"all-in-one installation."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:103
|
|
msgid "You pass in these configuration settings as parameters:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:105
|
|
msgid "The flavor"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:106
|
|
msgid "Your ssh key name"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:107
|
|
msgid "The unique identifier (UUID) of the image"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:120
|
|
msgid "The stack automatically creates a Nova instance, as follows:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:131
|
|
msgid "Verify that the stack was successfully created:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:142
|
|
msgid ""
|
|
"The stack reports an initial :code:`CREATE_IN_PROGRESS` status. When all "
|
|
"software is installed, the status changes to :code:`CREATE_COMPLETE`."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:145
|
|
msgid ""
|
|
"You might have to run the :code:`stack-list` command a few times before the "
|
|
"stack creation is complete."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:148
|
|
msgid "**Show information about the stack**"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:150
|
|
msgid "Get more information about the stack:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:156
|
|
msgid ""
|
|
"The `outputs` property shows the URL through which you can access the "
|
|
"Fractal application. You can SSH into the instance."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:159
|
|
msgid "**Remove the stack**"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:170
|
|
msgid "Verify the nova instance was deleted when the stack was removed:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:180
|
|
msgid ""
|
|
"While this stack starts a single instance that builds and runs the Fractal "
|
|
"application as an all-in-one installation, you can make very complicated "
|
|
"templates that impact dozens of instances or that add and remove instances "
|
|
"on demand. Continue to the next section to learn more."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:185
|
|
msgid "Work with stacks: Advanced"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:187
|
|
msgid ""
|
|
"With the Orchestration API, the Fractal application can create an auto-"
|
|
"scaling group for all parts of the application, to dynamically provision "
|
|
"more compute resources during periods of heavy utilization, and also "
|
|
"terminate compute instances to scale down, as demand decreases."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:192
|
|
msgid ""
|
|
"To learn about auto-scaling with the Orchestration API, read these articles:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:194
|
|
msgid ""
|
|
"http://superuser.openstack.org/articles/simple-auto-scaling-environment-with-"
|
|
"heat"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:195
|
|
msgid ""
|
|
"http://superuser.openstack.org/articles/understanding-openstack-heat-auto-"
|
|
"scaling"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:197
|
|
msgid ""
|
|
"Initially, the focus is on scaling the workers because they consume the most "
|
|
"resources."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:200
|
|
msgid ""
|
|
"The example template depends on the ceilometer project, which is part of the "
|
|
"`Telemetry service <https://wiki.openstack.org/wiki/Telemetry>`_."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:203
|
|
msgid ""
|
|
"The Telemetry service is not deployed by default in every cloud. If the "
|
|
"ceilometer commands do not work, this example does not work; ask your "
|
|
"support team for assistance."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:207
|
|
msgid ""
|
|
"To better understand how the template works, use this guide to install the "
|
|
"'ceilometer' command-line client:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:210
|
|
msgid ""
|
|
"http://docs.openstack.org/cli-reference/common/"
|
|
"cli_install_openstack_command_line_clients.html#install-the-clients"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:212
|
|
msgid ""
|
|
"To set up the necessary variables for your cloud in an 'openrc' file, use "
|
|
"this guide:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:215
|
|
msgid ""
|
|
"http://docs.openstack.org/cli-reference/common/"
|
|
"cli_set_environment_variables_using_openstack_rc.html"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:217
|
|
msgid ""
|
|
"The Telemetry service uses meters to measure a given aspect of a resources "
|
|
"usage. The meter that we are interested in is the :code:`cpu_util` meter."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:220
|
|
msgid "The value of a meter is regularly sampled and saved with a timestamp."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:222
|
|
msgid ""
|
|
"These saved samples are aggregated to produce a statistic. The statistic "
|
|
"that we are interested in is **avg**: the average of the samples over a "
|
|
"given period."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:225
|
|
msgid ""
|
|
"We are interested because the Telemetry service supports alarms: an alarm is "
|
|
"fired when our average statistic breaches a configured threshold. When the "
|
|
"alarm fires, an associated action is performed."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:229
|
|
msgid ""
|
|
"The stack we will be building uses the firing of alarms to control the "
|
|
"addition or removal of worker instances."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:232
|
|
msgid "To verify that ceilometer is installed, list the known meters:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:238
|
|
msgid ""
|
|
"This command returns a very long list of meters. Once a meter is created, it "
|
|
"is never thrown away!"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:241
|
|
msgid "Launch the stack with auto-scaling workers:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:256
|
|
msgid "As before, pass in configuration settings as parameters."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:258
|
|
msgid "And as before, the stack takes a few minutes to build!"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:260
|
|
msgid "Wait for it to reach the :code:`CREATE_COMPLETE` status:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:271
|
|
msgid ""
|
|
"Run the :code:`nova list` command. This template created three instances:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:284
|
|
msgid ""
|
|
"Note that the worker instance is part of an :code:`OS::Heat::"
|
|
"AutoScalingGroup`."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:286
|
|
msgid "Confirm that the stack created two alarms:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:298
|
|
msgid ""
|
|
"If either alarm reports the :code:`insufficient data` state, the default "
|
|
"sampling period of the stack is probably too low for your cloud; ask your "
|
|
"support team for assistance. You can set the period through the :code:"
|
|
"`period` parameter of the stack to match your clouds requirements."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:304
|
|
msgid "Use the stack ID to get more information about the stack:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:310
|
|
msgid ""
|
|
"The outputs section of the stack contains two ceilometer command-line "
|
|
"queries:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:312
|
|
msgid ""
|
|
":code:`ceilometer_sample_query`: shows the samples used to build the "
|
|
"statistics."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:313
|
|
msgid ""
|
|
":code:`ceilometer_statistics_query`: shows the statistics used to trigger "
|
|
"the alarms."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:315
|
|
msgid "These queries provide a view into the behavior of the stack."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:317
|
|
msgid ""
|
|
"In a new Terminal window, SSH into the 'api' API instance. Use the key pair "
|
|
"name that you passed in as a parameter."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:325
|
|
msgid "In your SSH session, confirm that no fractals were generated:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:336
|
|
msgid "Then, create a pair of large fractals:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:342
|
|
msgid ""
|
|
"In the Terminal window where you run ceilometer, run :code:"
|
|
"`ceilometer_sample_query` to see the samples."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:357
|
|
msgid ""
|
|
"The CPU utilization across workers increases as workers start to create the "
|
|
"fractals."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:359
|
|
msgid ""
|
|
"Run the :code:`ceilometer_statistics_query`: command to see the derived "
|
|
"statistics."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:373
|
|
msgid "The samples and the statistics are listed in opposite time order!"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:375
|
|
msgid "See the state of the alarms set up by the template:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:387
|
|
msgid ""
|
|
"Run the :code:`nova list` command to confirm that the :code:`OS::Heat::"
|
|
"AutoScalingGroup` has created more instances:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:403
|
|
msgid ""
|
|
"Now, wait until all the fractals are generated and the instances have idled "
|
|
"for some time."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:406
|
|
msgid ""
|
|
"Run the :code:`nova list` command to confirm that the :code:`OS::Heat::"
|
|
"AutoScalingGroup` removed the unneeded instances:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:420
|
|
msgid ""
|
|
"The :code:`OS::Heat::AutoScalingGroup` removes instances in creation order. "
|
|
"So the worker instance that was created first is the first instance to be "
|
|
"removed."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:424
|
|
msgid "In the outputs section of the stack, you can run these web API calls:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:426
|
|
msgid ""
|
|
":code:`scale__workers_up_url`: A post to this url will add worker instances."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:427
|
|
msgid ""
|
|
":code:`scale_workers_down_url`: A post to this url will remove worker "
|
|
"instances."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:429
|
|
msgid ""
|
|
"These demonstrate how the Ceilometer alarms add and remove instances. To use "
|
|
"them:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:436
|
|
msgid "To recap:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:438
|
|
msgid ""
|
|
"The auto-scaling stack sets up an API instance, a services instance, and an "
|
|
"auto-scaling group with a single worker instance. It also sets up ceilometer "
|
|
"alarms that add worker instances to the auto-scaling group when it is under "
|
|
"load, and removes instances when the group is idling. To do this, the alarms "
|
|
"post to URLs."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:444
|
|
msgid ""
|
|
"In this template, the alarms use metadata that is attached to each worker "
|
|
"instance. The metadata is in the :code:`metering.stack=stack_id` format."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:447
|
|
msgid "The prefix is `metering.` For example, `metering.some_name`."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:456
|
|
msgid ""
|
|
"You can aggregate samples and calculate statistics across all instances with "
|
|
"the `metering.some_name` metadata that has `some_value` by using a query of "
|
|
"the form:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:464
|
|
msgid "For example:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:471
|
|
msgid "The alarms have the form:"
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:477
|
|
msgid ""
|
|
"Spend some time playing with the stack and the Fractal app to see how it "
|
|
"works."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:479
|
|
msgid ""
|
|
"The message queue can take a while to notice that worker instances have died."
|
|
msgstr ""
|
|
|
|
#: ../orchestration.rst:484
|
|
msgid ""
|
|
"You should now be fairly confident working with the Orchestration service. "
|
|
"To see the calls that we did not cover and more, see the volume "
|
|
"documentation of your SDK. Or, try one of these steps in the tutorial:"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:3 ../scaling_out.rst:143
|
|
msgid "Scaling out"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:11
|
|
msgid ""
|
|
"An often-cited reason for designing applications by using cloud patterns is "
|
|
"the ability to **scale out**. That is: to add additional resources, as "
|
|
"required. Contrast this strategy to the previous one of increasing capacity "
|
|
"by scaling up the size of existing resources. To scale out, you must:"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:17
|
|
msgid "Architect your application to make use of additional resources."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:18
|
|
msgid "Make it possible to add new resources to your application."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:22
|
|
msgid ""
|
|
"The :doc:`/introduction` section describes how to build in a modular "
|
|
"fashion, create an API, and other aspects of the application architecture. "
|
|
"Now you will see why those strategies are so important. By creating a "
|
|
"modular application with decoupled services, you can identify components "
|
|
"that cause application performance bottlenecks and scale them out. Just as "
|
|
"importantly, you can also remove resources when they are no longer "
|
|
"necessary. It is very difficult to overstate the cost savings that this "
|
|
"feature can bring, as compared to traditional infrastructure."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:32
|
|
msgid ""
|
|
"Of course, having access to additional resources is only part of the game "
|
|
"plan; while you can manually add or delete resources, you get more value and "
|
|
"more responsiveness if the application automatically requests additional "
|
|
"resources when it needs them."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:37
|
|
msgid ""
|
|
"This section continues to illustrate the separation of services onto "
|
|
"multiple instances and highlights some of the choices that we have made that "
|
|
"facilitate scalability in the application architecture."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:41
|
|
msgid ""
|
|
"You will progressively ramp up to use up six instances, so make sure that "
|
|
"your cloud account has the appropriate quota."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:44
|
|
msgid ""
|
|
"The previous section uses two virtual machines - one 'control' service and "
|
|
"one 'worker'. The speed at which your application can generate fractals "
|
|
"depends on the number of workers. With just one worker, you can produce only "
|
|
"one fractal at a time. Before long, you will need more resources."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:50
|
|
msgid ""
|
|
"If you do not have a working application, follow the steps in :doc:"
|
|
"`introduction` to create one."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:57
|
|
msgid "Generate load"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:59
|
|
msgid ""
|
|
"To test what happens when the Fractals application is under load, you can:"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:62
|
|
msgid ""
|
|
"Load the worker: Create a lot of tasks to max out the CPU of existing worker "
|
|
"instances"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:64
|
|
msgid "Load the API: Create a lot of API service requests"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:67
|
|
msgid "Create more tasks"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:69 ../scaling_out.rst:106
|
|
msgid ""
|
|
"Use SSH with the existing SSH keypair to log in to the :code:`app-"
|
|
"controller` controller instance."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:76 ../scaling_out.rst:113
|
|
msgid ""
|
|
"Replace :code:`IP_CONTROLLER` with the IP address of the controller instance "
|
|
"and USERNAME with the appropriate user name."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:80
|
|
msgid ""
|
|
"Call the :code:`faafo` command-line interface to request the generation of "
|
|
"five large fractals."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:87
|
|
msgid ""
|
|
"If you check the load on the worker, you can see that the instance is not "
|
|
"doing well. On the single CPU flavor instance, a load average greater than 1 "
|
|
"means that the server is at capacity."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:96
|
|
msgid ""
|
|
"Replace :code:`IP_WORKER` with the IP address of the worker instance and "
|
|
"USERNAME with the appropriate user name."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:101
|
|
msgid "Create more API service requests"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:103
|
|
msgid ""
|
|
"API load is a slightly different problem than the previous one regarding "
|
|
"capacity to work. We can simulate many requests to the API, as follows:"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:117
|
|
msgid ""
|
|
"Use a for loop to call the :code:`faafo` command-line interface to request a "
|
|
"random set of fractals 500 times:"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:124
|
|
msgid ""
|
|
"Replace :code:`IP_CONTROLLER` with the IP address of the controller instance."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:127
|
|
msgid ""
|
|
"If you check the load on the :code:`app-controller` API service instance, "
|
|
"you see that the instance is not doing well. On your single CPU flavor "
|
|
"instance, a load average greater than 1 means that the server is at capacity."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:137
|
|
msgid ""
|
|
"The sheer number of requests means that some requests for fractals might not "
|
|
"make it to the message queue for processing. To ensure that you can cope "
|
|
"with demand, you must also scale out the API capability of the Fractals "
|
|
"application."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:146
|
|
msgid "Remove the existing app"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:148
|
|
msgid ""
|
|
"Go ahead and delete the existing instances and security groups that you "
|
|
"created in previous sections. Remember, when instances in the cloud are no "
|
|
"longer working, remove them and re-create something new."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:179
|
|
msgid "Extra security groups"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:181
|
|
msgid ""
|
|
"As you change the topology of your applications, you must update or create "
|
|
"security groups. Here, you re-create the required security groups."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:211
|
|
msgid "A floating IP helper function"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:213
|
|
msgid ""
|
|
"Define a short function to locate unused or allocate floating IPs. This "
|
|
"saves a few lines of code and prevents you from reaching your floating IP "
|
|
"quota too quickly."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:243
|
|
msgid "Split the database and message queue"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:245
|
|
msgid ""
|
|
"Before you scale out your application services, like the API service or the "
|
|
"workers, you must add a central database and an :code:`app-services` "
|
|
"messaging instance. The database and messaging queue will be used to track "
|
|
"the state of fractals and to coordinate the communication between the "
|
|
"services."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:276
|
|
msgid "Scale the API service"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:278
|
|
msgid ""
|
|
"With multiple workers producing fractals as fast as they can, the system "
|
|
"must be able to receive the requests for fractals as quickly as possible. If "
|
|
"our application becomes popular, many thousands of users might connect to "
|
|
"our API to generate fractals."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:283
|
|
msgid ""
|
|
"Armed with a security group, image, and flavor size, you can add multiple "
|
|
"API services:"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:311
|
|
msgid ""
|
|
"These services are client-facing, so unlike the workers they do not use a "
|
|
"message queue to distribute tasks. Instead, you must introduce some kind of "
|
|
"load balancing mechanism to share incoming requests between the different "
|
|
"API services."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:316
|
|
msgid ""
|
|
"A simple solution is to give half of your friends one address and half the "
|
|
"other, but that solution is not sustainable. Instead, you can use a `DNS "
|
|
"round robin <http://en.wikipedia.org/wiki/Round- robin_DNS>`_ to do that "
|
|
"automatically. However, OpenStack networking can provide Load Balancing as a "
|
|
"Service, which :doc:`/networking` explains."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:328
|
|
msgid "Scale the workers"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:330
|
|
msgid "To increase the overall capacity, add three workers:"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:357
|
|
msgid ""
|
|
"Adding this capacity enables you to deal with a higher number of requests "
|
|
"for fractals. As soon as these worker instances start, they begin checking "
|
|
"the message queue for requests, reducing the overall backlog like a new "
|
|
"register opening in the supermarket."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:362
|
|
msgid ""
|
|
"This process was obviously a very manual one. Figuring out that we needed "
|
|
"more workers and then starting new ones required some effort. Ideally the "
|
|
"system would do this itself. If you build your application to detect these "
|
|
"situations, you can have it automatically request and remove resources, "
|
|
"which saves you the effort of doing this work yourself. Instead, the "
|
|
"OpenStack Orchestration service can monitor load and start instances, as "
|
|
"appropriate. To find out how to set that up, see :doc:`orchestration`."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:372
|
|
msgid "Verify that we have had an impact"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:374
|
|
msgid ""
|
|
"In the previous steps, you split out several services and expanded capacity. "
|
|
"To see the new features of the Fractals application, SSH to one of the app "
|
|
"instances and create a few fractals."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:382
|
|
msgid ""
|
|
"Replace :code:`IP_API_1` with the IP address of the first API instance and "
|
|
"USERNAME with the appropriate user name."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:385
|
|
msgid "Use the :code:`faafo create` command to generate fractals."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:387
|
|
msgid ""
|
|
"Use the :code:`faafo list` command to watch the progress of fractal "
|
|
"generation."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:390
|
|
msgid "Use the :code:`faafo UUID` command to examine some of the fractals."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:392
|
|
msgid ""
|
|
"The `generated_by` field shows the worker that created the fractal. Because "
|
|
"multiple worker instances share the work, fractals are generated more "
|
|
"quickly and users might not even notice when a worker fails."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:442
|
|
msgid ""
|
|
"The fractals are now available from any of the app-api hosts. To verify, "
|
|
"visit http://IP_API_1/fractal/FRACTAL_UUID and http://IP_API_2/fractal/"
|
|
"FRACTAL_UUID. You now have multiple redundant web services. If one fails, "
|
|
"you can use the others."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:447
|
|
msgid ""
|
|
"Replace :code:`IP_API_1` and :code:`IP_API_2` with the corresponding "
|
|
"floating IPs. Replace FRACTAL_UUID with the UUID of an existing fractal."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:451
|
|
msgid ""
|
|
"Go ahead and test the fault tolerance. Start deleting workers and API "
|
|
"instances. As long as you have one of each, your application is fine. "
|
|
"However, be aware of one weak point. The database contains the fractals and "
|
|
"fractal metadata. If you lose that instance, the application stops. Future "
|
|
"sections will explain how to address this weak point."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:458
|
|
msgid ""
|
|
"If you had a load balancer, you could distribute this load between the two "
|
|
"different API services. You have several options. The :doc:`networking` "
|
|
"section shows you one option."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:462
|
|
msgid ""
|
|
"In theory, you could use a simple script to monitor the load on your workers "
|
|
"and API services and trigger the creation of instances, which you already "
|
|
"know how to do. Congratulations! You are ready to create scalable cloud "
|
|
"applications."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:467
|
|
msgid ""
|
|
"Of course, creating a monitoring system for a single application might not "
|
|
"make sense. To learn how to use the OpenStack Orchestration monitoring and "
|
|
"auto-scaling capabilities to automate these steps, see :doc:`orchestration`."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:475
|
|
msgid ""
|
|
"You should be fairly confident about starting instances and distributing "
|
|
"services from an application among these instances."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:478
|
|
msgid ""
|
|
"As mentioned in :doc:`/introduction`, the generated fractal images are saved "
|
|
"on the local file system of the API service instances. Because you have "
|
|
"multiple API instances up and running, the fractal images are spread across "
|
|
"multiple API services, which causes a number of :code:`IOError: [Errno 2] No "
|
|
"such file or directory` exceptions when trying to download a fractal image "
|
|
"from an API service instance that does not have the fractal image on its "
|
|
"local file system."
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:486
|
|
msgid ""
|
|
"Go to :doc:`/durability` to learn how to use Object Storage to solve this "
|
|
"problem in a elegant way. Or, you can proceed to one of these sections:"
|
|
msgstr ""
|
|
|
|
#: ../scaling_out.rst:500
|
|
msgid ""
|
|
"This file contains all the code from this tutorial section. This "
|
|
"comprehensive code sample lets you view and run the code as a single script."
|
|
msgstr ""
|