#, fuzzy msgid "" msgstr "" "Project-Id-Version: OpenStack First Application 2013.2.1.dev4253\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-07-17 08:22+0000\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 ` 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 `_, 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 `_ and `continuous deployment `_ (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 "" #: ../appendix.rst:27 msgid "" "Add the parameter network and send its name or id to attach the instance to:" msgstr "" #: ../appendix.rst:39 msgid "Add the option Networks and send its id to attach the instance to:" 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 ../durability.rst:109 ../introduction.rst:22 msgid "This section has not yet been completed for the pkgcloud SDK." msgstr "" #: ../block_storage.rst:55 ../durability.rst:113 ../networking.rst:56 msgid "This section has not yet been completed for the OpenStack SDK." msgstr "" #: ../block_storage.rst:59 ../durability.rst:117 ../introduction.rst:26 msgid "This section has not yet been completed for the PHP-OpenCloud SDK." msgstr "" #: ../block_storage.rst:63 msgid "Connect to the API endpoint:" msgstr "" #: ../block_storage.rst:93 msgid "To try it out, make a 1GB volume called 'test'." msgstr "" #: ../block_storage.rst:120 msgid "The parameter :code:`size` is in gigabytes." msgstr "" #: ../block_storage.rst:129 msgid "The parameter :code:`Size` is in gigabytes." msgstr "" #: ../block_storage.rst:131 msgid "To see if the volume creation was successful, list all volumes:" msgstr "" #: ../block_storage.rst:166 msgid "Use Block Storage for the Fractal database server" msgstr "" #: ../block_storage.rst:168 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:172 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:203 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:235 msgid "Log in to the server to run the following steps." msgstr "" #: ../block_storage.rst:237 msgid "" "Replace :code:`IP_DATABASE` with the IP address of the database instance and " "USERNAME to the appropriate user name." msgstr "" #: ../block_storage.rst:240 msgid "Now prepare the empty block device." msgstr "" #: ../block_storage.rst:280 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:289 msgid "" "Sync the file systems and mount the block device that contains the database " "files to :file:`/var/lib/mysql`." msgstr "" #: ../block_storage.rst:300 msgid "" "Finally, start the stopped MySQL database service and validate that " "everything works as expected." msgstr "" #: ../block_storage.rst:309 msgid "Extras" msgstr "" #: ../block_storage.rst:311 msgid "" "You can detach the volume and reattach it elsewhere, or use the following " "steps to delete the volume." msgstr "" #: ../block_storage.rst:315 msgid "The following operations are destructive and result in data loss." msgstr "" #: ../block_storage.rst:317 msgid "To detach and delete a volume:" msgstr "" #: ../block_storage.rst:329 msgid "" ":code:`detach_volume` and :code:`destroy_volume` take a volume object, not a " "name." msgstr "" #: ../block_storage.rst:353 ../block_storage.rst:368 msgid "" "Other features, such as creating volume snapshots, are useful for backups:" msgstr "" #: ../block_storage.rst:363 msgid "" "For information about these and other calls, see `libcloud documentation " "`_." msgstr "" #: ../block_storage.rst:375 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 file." msgstr "" #: ../block_storage.rst:383 msgid "Work with the OpenStack Database service" msgstr "" #: ../block_storage.rst:385 msgid "" "Previously, you manually created the database, which is useful for a single " "database that you rarely update. However, the OpenStack :code:`trove` " "component provides Database as a Service (DBaaS)." msgstr "" #: ../block_storage.rst:389 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:393 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:396 msgid "" "To install the 'trove' command-line client, see `Install the OpenStack " "command-line clients `_." msgstr "" #: ../block_storage.rst:400 msgid "" "To set up environment variables for your cloud in an :file:`openrc.sh` file, " "see `Set environment variables using the OpenStack RC file `_." msgstr "" #: ../block_storage.rst:404 msgid "" "Ensure you have an :file:`openrc.sh` file, source it, and validate that your " "trove client works:" msgstr "" #: ../block_storage.rst:421 msgid "" "For information about supported features and how to work with an existing " "database service installation, see `Database as a Service in OpenStack `_." msgstr "" #: ../block_storage.rst:426 ../craziness.rst:72 ../durability.rst:727 #: ../getting_started.rst:1744 ../introduction.rst:907 ../networking.rst:905 #: ../orchestration.rst:492 ../scaling_out.rst:484 msgid "Next steps" msgstr "" #: ../block_storage.rst:428 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:432 ../durability.rst:744 ../getting_started.rst:1753 #: ../introduction.rst:923 ../scaling_out.rst:503 msgid ":doc:`/orchestration`: Automatically orchestrate your application." msgstr "" #: ../block_storage.rst:433 ../durability.rst:745 ../getting_started.rst:1754 #: ../introduction.rst:924 ../orchestration.rst:499 ../scaling_out.rst:504 msgid ":doc:`/networking`: Learn about complex networking." msgstr "" #: ../block_storage.rst:434 ../durability.rst:746 ../getting_started.rst:1755 #: ../introduction.rst:925 ../networking.rst:911 ../orchestration.rst:500 #: ../scaling_out.rst:505 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 " "`_ 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 " "`_ 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 `_ 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 `_ 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 `_?" 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 `_ (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 `_. If you encounter this, you can upgrade your " "libcloud version, or apply a simple `2-line patch `_." 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:133 msgid "" "To begin to store objects, we must first make a container. Call yours :code:" "`fractals`:" msgstr "" #: ../durability.rst:142 ../durability.rst:161 ../durability.rst:173 #: ../durability.rst:199 ../durability.rst:218 msgid "You should see output such as:" msgstr "" #: ../durability.rst:190 msgid "" "You should now be able to see this container appear in a listing of all " "containers in your account:" msgstr "" #: ../durability.rst:242 msgid "" "The next logical step is to upload an object. Find a photo of a goat online, " "name it :code:`goat.jpg`, and upload it to your :code:`fractals` container:" msgstr "" #: ../durability.rst:278 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:401 msgid "Finally, clean up by deleting the test object:" msgstr "" #: ../durability.rst:422 msgid "You must pass in objects and not object names to the delete commands." msgstr "" #: ../durability.rst:424 ../durability.rst:448 msgid "Now, no more objects are available in the :code:`fractals` container." msgstr "" #: ../durability.rst:466 msgid "Back up the Fractals from the database on the Object Storage" msgstr "" #: ../durability.rst:468 msgid "" "Back up the Fractals app images, which are currently stored inside the " "database, on Object Storage." msgstr "" #: ../durability.rst:471 msgid "Place the images in the :code:`fractals` container:" msgstr "" #: ../durability.rst:505 msgid "" "Next, back up all existing fractals from the database to the swift container." " A simple loop takes care of that:" msgstr "" #: ../durability.rst:508 msgid "Replace :code:`IP_API_1` with the IP address of the API instance." msgstr "" #: ../durability.rst:536 ../durability.rst:547 msgid "" "The example code uses the awesome `Requests library `_. Before you try to run the previous script, make " "sure that it is installed on your system." msgstr "" #: ../durability.rst:560 msgid "Configure the Fractals app to use Object Storage" msgstr "" #: ../durability.rst:562 msgid "" "Currently, you cannot directly store generated images in OpenStack Object " "Storage. Please revisit this section again in the future." msgstr "" #: ../durability.rst:567 msgid "Extra features" msgstr "" #: ../durability.rst:570 msgid "Delete containers" msgstr "" #: ../durability.rst:572 msgid "" "To delete a container, you must first remove all objects from the container. " "Otherwise, the delete operation fails:" msgstr "" #: ../durability.rst:607 msgid "It is not possible to restore deleted objects. Be careful." msgstr "" #: ../durability.rst:610 msgid "Add metadata to objects" msgstr "" #: ../durability.rst:612 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:618 ../durability.rst:636 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:649 msgid "This adds a \"foo\" key to the metadata that has a value of \"bar\"." msgstr "" #: ../durability.rst:653 msgid "" "Swift metadata keys are prepended with \"x-object-meta-\" so when you get " "the object with get_object(), in order to get the value of the metadata your " "key will be \"x-object-meta-foo\"." msgstr "" #: ../durability.rst:669 msgid "Large objects" msgstr "" #: ../durability.rst:671 msgid "" "For efficiency, most Object Storage installations treat large objects, :code:" "`> 5GB`, differently than smaller objects." msgstr "" #: ../durability.rst:682 msgid "" "If you work with large objects, use the :code:`RegionScopedBlobStoreContext` " "class family instead of the ones used so far." msgstr "" #: ../durability.rst:685 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:696 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:709 ../getting_started.rst:1761 ../introduction.rst:929 #: ../scaling_out.rst:509 msgid "Complete code sample" msgstr "" #: ../durability.rst:711 msgid "" "This file contains all the code from this tutorial section. This class lets " "you view and run the code." msgstr "" #: ../durability.rst:714 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:722 msgid "" "Shade's create_object function has a \"use_slo\" parameter (that defaults to " "true) which will break your object into smaller objects for upload and " "rejoin them if needed." msgstr "" #: ../durability.rst:729 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:734 msgid "" "https://github.com/fog/fog/blob/master/lib/fog/openstack/docs/storage.md" msgstr "" #: ../durability.rst:738 msgid "https://libcloud.readthedocs.org/en/latest/storage/api.html" msgstr "" #: ../durability.rst:740 msgid "Or, try one of these tutorial steps:" msgstr "" #: ../durability.rst:742 ../getting_started.rst:1751 ../introduction.rst:921 #: ../scaling_out.rst:501 msgid "" ":doc:`/block_storage`: Migrate the database to block storage, or use the " "database-as-a-service component." msgstr "" #: ../durability.rst:747 ../getting_started.rst:1756 ../introduction.rst:926 #: ../networking.rst:912 ../orchestration.rst:501 ../scaling_out.rst:506 msgid "" ":doc:`/craziness`: Learn some crazy things that you might not think to do ;)" 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 `_. 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:52 msgid "OpenStack SDKs" msgstr "" #: ../getting_started.rst:56 msgid "Language" msgstr "" #: ../getting_started.rst:57 msgid "Name" msgstr "" #: ../getting_started.rst:58 ../introduction.rst:677 ../introduction.rst:766 msgid "Description" msgstr "" #: ../getting_started.rst:59 msgid "URL" msgstr "" #: ../getting_started.rst:60 ../getting_started.rst:64 #: ../getting_started.rst:69 msgid "Python" msgstr "" #: ../getting_started.rst:61 msgid "OpenStack SDK" msgstr "" #: ../getting_started.rst:62 msgid "Official Python-based library for OpenStack." msgstr "" #: ../getting_started.rst:63 msgid "https://docs.openstack.org/openstacksdk/latest/" msgstr "" #: ../getting_started.rst:65 msgid "`Libcloud `_" msgstr "" #: ../getting_started.rst:66 msgid "" "A Python-based library that the Apache Foundation manages. Use it to work " "with multiple cloud types." msgstr "" #: ../getting_started.rst:68 msgid "" "https://libcloud.readthedocs.org/en/latest/compute/drivers/openstack.html" 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 "https://docs.openstack.org/infra/shade/" msgstr "" #: ../getting_started.rst:74 msgid "Java" msgstr "" #: ../getting_started.rst:75 msgid "`jClouds `_" 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 `_" 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-openstack/blob/master/docs/getting_started.md" msgstr "" #: ../getting_started.rst:84 msgid "node.js" msgstr "" #: ../getting_started.rst:85 msgid "`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 `_" 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:99 msgid "Go" msgstr "" #: ../getting_started.rst:100 msgid "`gophercloud `_" msgstr "" #: ../getting_started.rst:101 msgid "" "A go-based SDK. Use it to write Golang code that works with OpenStack clouds." "" msgstr "" #: ../getting_started.rst:103 msgid "http://gophercloud.io/" msgstr "" #: ../getting_started.rst:105 msgid "" "For a list of available SDKs, see `Software Development Kits `_." msgstr "" #: ../getting_started.rst:107 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 `_ members." msgstr "" #: ../getting_started.rst:114 msgid "What you need" msgstr "" #: ../getting_started.rst:116 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:122 msgid "To interact with the cloud, you must also have" msgstr "" #: ../getting_started.rst:126 msgid "" "`OpenStack Cloud SDK for Microsoft .NET 1.4.0.1 or later installed `_." msgstr "" #: ../getting_started.rst:131 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:138 msgid "This document has not yet been completed for the .NET SDK." msgstr "" #: ../getting_started.rst:142 msgid "" "`fog 1.19 or higher installed `_ and working with ruby gems 1.9." msgstr "" #: ../getting_started.rst:148 msgid "This document has not yet been completed for the fog SDK." msgstr "" #: ../getting_started.rst:152 msgid "" "`jClouds 1.8 or higher installed `_." msgstr "" #: ../getting_started.rst:154 msgid "" "Our code samples use `Java 8 `_." msgstr "" #: ../getting_started.rst:157 msgid "We have created a Maven POM file to help you get started." msgstr "" #: ../getting_started.rst:159 msgid "" "If you do not know Maven then the `Maven home site `_ is a good place to learn more." msgstr "" #: ../getting_started.rst:162 msgid "**pom.xml:**" msgstr "" #: ../getting_started.rst:167 msgid "" "Place the above pom.xml into the root directory of your project. Then create " "the nested subdirectory tree :code:`src` -> :code:`main` -> :code:`java`. " "Place the Java code samples that you copy from this book into the folder " "named \":code:`java`\"." msgstr "" #: ../getting_started.rst:171 msgid "" "So, for example, the file named :code:`GettingStarted.java` from the end of " "this chapter would be located as follows:" msgstr "" #: ../getting_started.rst:181 msgid "" "To use Maven to compile a downloaded sample, with the command prompt located " "in the same directory as the :code:`pom.xml` file, enter:" msgstr "" #: ../getting_started.rst:188 msgid "" "Maven will download and install any dependencies required for compilation, " "then execute the Java compiler. All files in the :code:`java` subdirectory " "will be compiled." msgstr "" #: ../getting_started.rst:191 msgid "" "To use Maven to run each downloaded sample, with the command prompt located " "in the same directory as the :code:`pom.xml` file, enter:" msgstr "" #: ../getting_started.rst:199 msgid "" "Maven will download and install any further dependencies required and then " "run the chosen class." msgstr "" #: ../getting_started.rst:204 msgid "" "`libcloud 0.15.1 or higher installed `_." msgstr "" #: ../getting_started.rst:209 msgid "" "`pkgcloud 1.2 or higher installed `_." msgstr "" #: ../getting_started.rst:216 msgid "" "a recent version of `OpenStackSDK `_ installed." msgstr "" #: ../getting_started.rst:221 msgid "" "`a recent version of php-opencloud installed `_." msgstr "" #: ../getting_started.rst:225 msgid "This document has not yet been completed for the php-opencloud SDK." msgstr "" #: ../getting_started.rst:229 msgid "" "`a recent version of shade installed `_." msgstr "" #: ../getting_started.rst:231 msgid "Before proceeding, install the latest version of shade." msgstr "" #: ../getting_started.rst:235 msgid "" "`a recent version of gophercloud installed `_" msgstr "" #: ../getting_started.rst:238 msgid "Obtain the following information from your cloud provider:" msgstr "" #: ../getting_started.rst:240 msgid "auth URL" msgstr "" #: ../getting_started.rst:241 msgid "user name" msgstr "" #: ../getting_started.rst:242 msgid "password" msgstr "" #: ../getting_started.rst:243 msgid "project ID or name (projects are also known as tenants)" msgstr "" #: ../getting_started.rst:244 msgid "cloud region" msgstr "" #: ../getting_started.rst:246 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:256 msgid "The actual auth URL is:" msgstr "" #: ../getting_started.rst:263 msgid "How you interact with OpenStack" msgstr "" #: ../getting_started.rst:265 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:278 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:287 msgid "" "First provide the appropriate identity, credentials and authorization URL " "for your project. Then get an instance of the Nova API interface." msgstr "" #: ../getting_started.rst:297 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:306 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:315 msgid "" "To use the OpenStack .NET SDK, add the following code in the required " "namespace section." msgstr "" #: ../getting_started.rst:324 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:335 msgid "" "Because the tutorial reuses the :code:`conn` object, make sure that you " "always have one handy." msgstr "" #: ../getting_started.rst:340 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:345 msgid "" "If your provider does not support regions, try a blank string ('') for the " "`region_name`." msgstr "" #: ../getting_started.rst:350 msgid "" "Use your credentials above to specify the cloud provider name, username, " "password, project_name and region_name in the file :file:`~/.config/" "openstack/clouds.yml`." msgstr "" #: ../getting_started.rst:357 msgid "" "If you do use a public cloud `known by shade `_, you can avoid specifying :" "code:`auth_url:` and instead specify :code:`profile: $PROVIDER_NAME` in the " "clouds.yml file." msgstr "" #: ../getting_started.rst:362 msgid "" "To configure shade using a profile, use your credentials above to specify " "the cloud provider name, username, password, project name, and region name " "in the file :file:`~/.config/openstack/clouds.yml`." msgstr "" #: ../getting_started.rst:369 msgid "" "See `configure shade `_, to configure your cloud using a profile." msgstr "" #: ../getting_started.rst:378 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:386 msgid "Use environment variables to set your cloud credentials" msgstr "" #: ../getting_started.rst:393 msgid "" "The client object accesses the Compute v2.0 service and type v2.1, so that " "version is in this tutorial." msgstr "" #: ../getting_started.rst:397 msgid "Flavors and images" msgstr "" #: ../getting_started.rst:399 msgid "" "To run your application, you must launch an instance. This instance serves " "as a virtual machine." msgstr "" #: ../getting_started.rst:402 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:408 msgid "" "To list the images that are available in your cloud, run some API calls:" msgstr "" #: ../getting_started.rst:423 ../getting_started.rst:436 #: ../getting_started.rst:461 ../getting_started.rst:477 #: ../getting_started.rst:528 ../getting_started.rst:551 #: ../getting_started.rst:567 ../getting_started.rst:592 #: ../getting_started.rst:611 ../getting_started.rst:669 #: ../getting_started.rst:711 ../getting_started.rst:723 #: ../getting_started.rst:741 ../getting_started.rst:753 #: ../getting_started.rst:824 ../getting_started.rst:836 #: ../getting_started.rst:855 ../getting_started.rst:869 #: ../getting_started.rst:958 ../getting_started.rst:989 #: ../getting_started.rst:1003 msgid "This code returns output like this:" msgstr "" #: ../getting_started.rst:514 ../getting_started.rst:650 #: ../getting_started.rst:783 ../getting_started.rst:908 msgid "You should see output something like this:" msgstr "" #: ../getting_started.rst:536 msgid "You can also get information about available flavors:" msgstr "" #: ../getting_started.rst:679 msgid "Your images and flavors will be different, of course." msgstr "" #: ../getting_started.rst:681 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:687 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 `_." msgstr "" #: ../getting_started.rst:692 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:695 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:803 ../getting_started.rst:921 #: ../getting_started.rst:1022 msgid "You should see output like this:" msgstr "" #: ../getting_started.rst:809 msgid "Next, tell the script which flavor you want to use:" msgstr "" #: ../getting_started.rst:863 msgid "Specify the flavor ID that you would like to use." msgstr "" #: ../getting_started.rst:927 msgid "Now, you can launch the instance." msgstr "" #: ../getting_started.rst:930 msgid "Launch an instance" msgstr "" #: ../getting_started.rst:932 msgid "Use your selected image and flavor to create an instance." msgstr "" #: ../getting_started.rst:934 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:941 msgid "Create the instance." msgstr "" #: ../getting_started.rst:943 msgid "Your SDK might call an instance a 'node' or 'server'." msgstr "" #: ../getting_started.rst:977 msgid "You should see output something like:" msgstr "" #: ../getting_started.rst:1028 msgid "If you list existing instances:" msgstr "" #: ../getting_started.rst:1083 msgid "The new instance appears." msgstr "" #: ../getting_started.rst:1195 msgid "Before you continue, you must do one more thing." msgstr "" #: ../getting_started.rst:1198 msgid "Destroy an instance" msgstr "" #: ../getting_started.rst:1200 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:1256 msgid "If you list the instances again, the instance disappears." msgstr "" #: ../getting_started.rst:1258 msgid "" "Leave your shell open to use it for another instance deployment in this " "section." msgstr "" #: ../getting_started.rst:1262 msgid "Deploy the application to a new instance" msgstr "" #: ../getting_started.rst:1264 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:1269 msgid "" "Internet connectivity from your cloud instance is required to download the " "application." msgstr "" #: ../getting_started.rst:1272 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:1278 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 `_ first. We will cover " "these instructions in depth in :doc:`/introduction`." msgstr "" #: ../getting_started.rst:1285 msgid "" "In the following example, set :code:`pub_key_file` to the location of your " "public SSH key file." msgstr "" #: ../getting_started.rst:1298 msgid "" "If you see an IOError, you may need to change ``~/.ssh/`` to ``/home/" "{USERNAME}/.ssh/``, using an absolute path." msgstr "" #: ../getting_started.rst:1323 msgid "If a key pair of the given name is not found then one is generated." msgstr "" #: ../getting_started.rst:1347 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:1396 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:1435 msgid "User data in openstacksdk must be encoded to Base64" msgstr "" #: ../getting_started.rst:1448 msgid "Now, you can boot and configure the instance." msgstr "" #: ../getting_started.rst:1451 msgid "Boot and configure an instance" msgstr "" #: ../getting_started.rst:1453 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:1477 msgid "The shade framework can select and assign a free floating IP quickly" msgstr "" #: ../getting_started.rst:1503 msgid "" "When the instance boots, the `ex_userdata` variable value instructs the " "instance to deploy the Fractals application." msgstr "" #: ../getting_started.rst:1507 msgid "Associate a floating IP for external connectivity" msgstr "" #: ../getting_started.rst:1509 msgid "We cover networking in detail in :doc:`/networking`." msgstr "" #: ../getting_started.rst:1511 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:1527 msgid "This gets an IP address that you can assign to your instance:" msgstr "" #: ../getting_started.rst:1536 ../getting_started.rst:1645 msgid "To see whether a private IP address is assigned to your instance:" msgstr "" #: ../getting_started.rst:1542 ../getting_started.rst:1654 msgid "" "If one is assigned, users can use this address to access the instance on " "some OpenStack clouds." msgstr "" #: ../getting_started.rst:1545 ../getting_started.rst:1657 msgid "To determine whether a public IP address is assigned to your instance:" msgstr "" #: ../getting_started.rst:1551 ../getting_started.rst:1664 msgid "If one is assigned, users can use this address to access the instance." msgstr "" #: ../getting_started.rst:1553 ../getting_started.rst:1666 msgid "To create a floating IP address to use with your instance:" msgstr "" #: ../getting_started.rst:1555 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:1563 ../getting_started.rst:1585 #: ../getting_started.rst:1631 msgid "This code returns the floating IP address:" msgstr "" #: ../getting_started.rst:1577 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:1591 ../getting_started.rst:1676 msgid "Attach the floating IP address to the instance:" msgstr "" #: ../getting_started.rst:1605 msgid "Allocate the floating IP address:" msgstr "" #: ../getting_started.rst:1612 msgid "Then attach it to the instance:" msgstr "" #: ../getting_started.rst:1621 msgid "" "For this example, we take a floating IP pool from the 'public' network, " "which is your external network." msgstr "" #: ../getting_started.rst:1624 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:1637 msgid "You can then attach it to the instance:" msgstr "" #: ../getting_started.rst:1668 msgid "" "Use network service client to 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:1683 msgid "Run the script to start the deployment." msgstr "" #: ../getting_started.rst:1686 msgid "Access the application" msgstr "" #: ../getting_started.rst:1688 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:1733 msgid "" "If you do not use floating IP addresses, substitute another IP address, as " "appropriate." msgstr "" #: ../getting_started.rst:1746 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:1749 msgid ":doc:`/scaling_out`: Learn how to scale your application." msgstr "" #: ../getting_started.rst:1750 msgid "" ":doc:`/durability`: Learn how to use Object Storage to make your application " "durable." msgstr "" #: ../getting_started.rst:1763 ../introduction.rst:931 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:1767 ../introduction.rst:935 ../scaling_out.rst:515 msgid "" "Before you run this script, confirm that you have set your authentication " "information, the flavor ID, and image ID." msgstr "" #: ../getting_started.rst:1797 msgid "**GettingStarted.java:**" msgstr "" #: ../index.rst:3 msgid "Writing your first OpenStack application" msgstr "" #: ../index.rst:6 msgid "Contents" 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:31 msgid "Cloud application architecture principles" msgstr "" #: ../introduction.rst:33 msgid "" "Cloud applications typically share several design principles. These " "principles influenced the design of the Fractals application." msgstr "" #: ../introduction.rst:41 msgid "Modularity and micro-services" msgstr "" #: ../introduction.rst:43 msgid "" "`Micro-services `_ 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:51 msgid "Scalability" msgstr "" #: ../introduction.rst:53 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:63 msgid "Fault tolerance" msgstr "" #: ../introduction.rst:65 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:68 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:73 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:80 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:87 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:91 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:99 msgid "Fault tolerance is essential to the cloud-based application." msgstr "" #: ../introduction.rst:102 msgid "Automation" msgstr "" #: ../introduction.rst:104 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:111 msgid "Programmatic interfaces (APIs)" msgstr "" #: ../introduction.rst:113 msgid "" "Like many cloud applications, the Fractals application has a `RESTful API " "`_. 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:121 msgid "Fractals application architecture" msgstr "" #: ../introduction.rst:123 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:131 msgid "" "Message queues are used to facilitate communication between the Fractal " "application services. The Fractal application uses a `work queue `_ (or task queue) to " "distribute tasks to the worker services." msgstr "" #: ../introduction.rst:136 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:142 msgid "" "This is a `useful pattern `_ 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:147 msgid "" "The `RabbitMQ getting started tutorial `_ provides a great introduction to message queues." msgstr "" #: ../introduction.rst:153 msgid "" "The worker service consumes messages from the work queue and then processes " "them to create the corresponding fractal image file." msgstr "" #: ../introduction.rst:156 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:168 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:174 msgid "How the Fractals application interacts with OpenStack" msgstr "" #: ../introduction.rst:187 msgid "The magic revisited" msgstr "" #: ../introduction.rst:189 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:215 msgid "" "Note that we will be showing the commands in a more idiomatic Java way: as " "methods on a class." msgstr "" #: ../introduction.rst:229 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:235 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:240 msgid "Introduction to cloud-init" msgstr "" #: ../introduction.rst:242 msgid "" "`cloud-init `_ 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:248 msgid "" "In this case, we are presenting a shell script as the `userdata `_. " "When :code:`create_node` creates the instance, :code:`cloud-init` executes " "the shell script in the :code:`userdata` variable." msgstr "" #: ../introduction.rst:253 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 `_ 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:292 msgid "User data in openstacksdk must be encoded to Base64." msgstr "" #: ../introduction.rst:294 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 `_." msgstr "" #: ../introduction.rst:301 msgid "Introduction to key pairs" msgstr "" #: ../introduction.rst:303 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:309 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:313 msgid "Introduction to security groups" msgstr "" #: ../introduction.rst:315 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:320 msgid "" "Removing the egress rule created by OpenStack will cause your instance " "networking to break." msgstr "" #: ../introduction.rst:323 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:346 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:363 msgid "You can list available security groups with:" msgstr "" #: ../introduction.rst:397 msgid "Once you have created a rule or group, you can also delete it:" msgstr "" #: ../introduction.rst:431 msgid "To see which security groups apply to an instance, you can:" msgstr "" #: ../introduction.rst:491 msgid "" "Once you have configured permissions, you must know where to access the " "application." msgstr "" #: ../introduction.rst:495 msgid "Introduction to Floating IPs" msgstr "" #: ../introduction.rst:497 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:502 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:512 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:517 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:527 ../introduction.rst:549 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:536 ../introduction.rst:558 msgid "" "Now request that an address from this pool be allocated to your project." msgstr "" #: ../introduction.rst:573 msgid "First check for an unused floating IP." msgstr "" #: ../introduction.rst:580 msgid "" "If you have no free floating IPs that have been previously allocated for " "your project, then 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:590 msgid "Then request an IP number be allocated from the pool." msgstr "" #: ../introduction.rst:603 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:612 msgid "" "Now request an address from this network to be allocated to your project." msgstr "" #: ../introduction.rst:618 msgid "" "Now that you have an unused floating IP address allocated to your project, " "attach it to an instance." msgstr "" #: ../introduction.rst:653 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:657 msgid "Splitting services across multiple instances" msgstr "" #: ../introduction.rst:659 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:663 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:666 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:672 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:677 ../introduction.rst:766 msgid "Parameter" msgstr "" #: ../introduction.rst:677 msgid "Values" msgstr "" #: ../introduction.rst:679 msgid ":code:`-i`" msgstr "" #: ../introduction.rst:679 msgid "" ":code:`messaging` (install RabbitMQ) and :code:`faafo` (install the Faafo " "app)." msgstr "" #: ../introduction.rst:679 msgid "Install a service" msgstr "" #: ../introduction.rst:680 msgid ":code:`-r`" msgstr "" #: ../introduction.rst:680 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:680 msgid "Enable/start something" msgstr "" #: ../introduction.rst:717 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:720 msgid "Next, start a second instance, which will be the worker instance:" msgstr "" #: ../introduction.rst:756 msgid "" "Notice that you have added this instance to the worker_group, so it can " "access the controller." msgstr "" #: ../introduction.rst:759 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:766 msgid "Example" msgstr "" #: ../introduction.rst:768 msgid ":code:`-e`" msgstr "" #: ../introduction.rst:768 msgid "The endpoint URL of the API service." msgstr "" #: ../introduction.rst:768 msgid "http://localhost/" msgstr "" #: ../introduction.rst:769 msgid ":code:`-m`" msgstr "" #: ../introduction.rst:769 msgid "The transport URL of the messaging service." msgstr "" #: ../introduction.rst:769 msgid "amqp://guest:guest@localhost:5672/" msgstr "" #: ../introduction.rst:770 msgid ":code:`-d`" msgstr "" #: ../introduction.rst:770 msgid "The connection URL for the database (not used here)." msgstr "" #: ../introduction.rst:770 msgid "sqlite:////tmp/sqlite.db" msgstr "" #: ../introduction.rst:773 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:779 msgid "Login with SSH and use the Fractal app" msgstr "" #: ../introduction.rst:781 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:816 msgid "Now you can SSH into the instance:" msgstr "" #: ../introduction.rst:822 msgid "" "Replace :code:`IP_WORKER_1` with the IP address of the worker instance and " "USERNAME to the appropriate user name." msgstr "" #: ../introduction.rst:825 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:834 msgid "" "Open :code:`top` to monitor the CPU usage of the :code:`faafo-worker` " "process." msgstr "" #: ../introduction.rst:836 msgid "" "Now log into the controller instance, :code:`app-controller`, also with SSH, " "using the previously added SSH key pair \"demokey\"." msgstr "" #: ../introduction.rst:843 msgid "" "Replace :code:`IP_CONTROLLER` with the IP address of the controller instance " "and USERNAME to the appropriate user name." msgstr "" #: ../introduction.rst:846 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:855 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:864 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:873 msgid "" "To show the details of a specific fractal use the subcommand :code:`show` of " "the Faafo CLI." msgstr "" #: ../introduction.rst:894 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:898 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:909 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:917 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:920 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 `_ 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 `_ 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:60 msgid "" "PHP-OpenCloud 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 'openstack' command-line client: https://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: https://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 " "openstack 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:282 msgid "Now, create a network and subnet for the web servers." msgstr "" #: ../networking.rst:342 msgid "Next, create a network and subnet for the API servers." msgstr "" #: ../networking.rst:402 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:448 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:455 msgid "Connecting to the Internet" msgstr "" #: ../networking.rst:457 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:487 msgid "" "Specify an external gateway for your router to tell OpenStack which network " "to use for Internet access." msgstr "" #: ../networking.rst:521 msgid "Now, attach your router to the worker, API, and web server subnets." msgstr "" #: ../networking.rst:532 msgid "Booting a worker" msgstr "" #: ../networking.rst:534 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:577 msgid "Load balancing" msgstr "" #: ../networking.rst:579 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:586 msgid "Neutron LbaaS API" msgstr "" #: ../networking.rst:588 msgid "" "This section is based on the Neutron LBaaS API version 1.0 https://docs." "openstack.org/admin-guide/networking_adv-features.html#basic-load-balancer-" "as-a-service-operations" msgstr "" #: ../networking.rst:595 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:620 msgid "" "libcloud support added 0.14: https://developer.rackspace.com/blog/libcloud-0-" "dot-14-released/" msgstr "" #: ../networking.rst:623 msgid "Start by looking at what is already in place." msgstr "" #: ../networking.rst:636 msgid "Go ahead and create two instances." msgstr "" #: ../networking.rst:672 msgid "Confirm that they were added:" msgstr "" #: ../networking.rst:684 msgid "Look at which ports are available:" msgstr "" #: ../networking.rst:705 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:749 msgid "" "You are ready to create members for the load balancer pool, which reference " "the floating IPs:" msgstr "" #: ../networking.rst:786 msgid "You should be able to see them in the member list:" msgstr "" #: ../networking.rst:798 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:825 msgid "" "Now create a virtual IP that will be used to direct traffic between the " "various members of the pool:" msgstr "" #: ../networking.rst:852 msgid "And confirm it is in place:" msgstr "" #: ../networking.rst:863 msgid "Now, look at the big picture." msgstr "" #: ../networking.rst:866 msgid "Final result" msgstr "" #: ../networking.rst:868 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:907 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 service 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 service 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 `_, and takes you through some " "common OpenStack Orchestration calls." msgstr "" #: ../orchestration.rst:44 msgid "" "In previous sections, you used your SDK to programmatically 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: https://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 `_." msgstr "" #: ../orchestration.rst:66 msgid "" "Jclouds does not currently support OpenStack Orchestration. See this `bug " "report `_." 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 `_" msgstr "" #: ../orchestration.rst:80 msgid "The OpenStack SDK does not currently support OpenStack Orchestration." msgstr "" #: ../orchestration.rst:84 msgid "" "PHP-opencloud supports OpenStack Orchestration :D:D:D but this section is " "not written yet." 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 `_." msgstr "" #: ../orchestration.rst:94 msgid "Work with stacks: Basics" msgstr "" #: ../orchestration.rst:96 msgid "**Stack create**" msgstr "" #: ../orchestration.rst:98 msgid "" "The `hello_faafo `_ 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:127 msgid "The stack automatically creates a Nova instance, as follows:" msgstr "" #: ../orchestration.rst:138 msgid "Verify that the stack was successfully created:" msgstr "" #: ../orchestration.rst:149 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:152 msgid "" "You might have to run the :command:`openstack stack list` command a few " "times before the stack creation is complete." msgstr "" #: ../orchestration.rst:155 msgid "**Show information about the stack**" msgstr "" #: ../orchestration.rst:157 msgid "Get more information about the stack:" msgstr "" #: ../orchestration.rst:163 msgid "" "The `outputs` property shows the URL through which you can access the " "Fractal application. You can SSH into the instance." msgstr "" #: ../orchestration.rst:166 msgid "**Remove the stack**" msgstr "" #: ../orchestration.rst:173 msgid "Verify the nova instance was deleted when the stack was removed:" msgstr "" #: ../orchestration.rst:183 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:188 msgid "Work with stacks: Advanced" msgstr "" #: ../orchestration.rst:190 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:195 msgid "" "To learn about auto-scaling with the Orchestration API, read these articles:" msgstr "" #: ../orchestration.rst:197 msgid "" "https://superuser.openstack.org/articles/simple-auto-scaling-environment-" "with-heat" msgstr "" #: ../orchestration.rst:198 msgid "" "https://superuser.openstack.org/articles/understanding-openstack-heat-auto-" "scaling" msgstr "" #: ../orchestration.rst:200 msgid "" "Initially, the focus is on scaling the workers because they consume the most " "resources." msgstr "" #: ../orchestration.rst:203 msgid "" "The example template depends on the ceilometer project, which is part of the " "`Telemetry service `_." msgstr "" #: ../orchestration.rst:206 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:210 msgid "" "To better understand how the template works, use this guide to install the " "'ceilometer' command-line client:" msgstr "" #: ../orchestration.rst:213 msgid "" "https://docs.openstack.org/cli-reference/common/" "cli_install_openstack_command_line_clients.html#install-the-clients" msgstr "" #: ../orchestration.rst:215 msgid "" "To set up the necessary variables for your cloud in an 'openrc' file, use " "this guide:" msgstr "" #: ../orchestration.rst:218 msgid "" "https://docs.openstack.org/cli-reference/common/" "cli_set_environment_variables_using_openstack_rc.html" msgstr "" #: ../orchestration.rst:220 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:223 msgid "The value of a meter is regularly sampled and saved with a timestamp." msgstr "" #: ../orchestration.rst:225 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:228 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:232 msgid "" "The stack we will be building uses the firing of alarms to control the " "addition or removal of worker instances." msgstr "" #: ../orchestration.rst:235 msgid "To verify that ceilometer is installed, list the known meters:" msgstr "" #: ../orchestration.rst:241 msgid "" "This command returns a very long list of meters. Once a meter is created, it " "is never thrown away!" msgstr "" #: ../orchestration.rst:244 msgid "Launch the stack with auto-scaling workers:" msgstr "" #: ../orchestration.rst:266 msgid "As before, pass in configuration settings as parameters." msgstr "" #: ../orchestration.rst:268 msgid "And as before, the stack takes a few minutes to build!" msgstr "" #: ../orchestration.rst:270 msgid "Wait for it to reach the :code:`CREATE_COMPLETE` status:" msgstr "" #: ../orchestration.rst:281 msgid "" "Run the :code:`nova list` command. This template created three instances:" msgstr "" #: ../orchestration.rst:294 msgid "" "Note that the worker instance is part of an :code:`OS::Heat::" "AutoScalingGroup`." msgstr "" #: ../orchestration.rst:296 msgid "Confirm that the stack created two alarms:" msgstr "" #: ../orchestration.rst:308 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:314 msgid "Use the stack ID to get more information about the stack:" msgstr "" #: ../orchestration.rst:320 msgid "" "The outputs section of the stack contains two ceilometer command-line " "queries:" msgstr "" #: ../orchestration.rst:322 msgid "" ":code:`ceilometer_sample_query`: shows the samples used to build the " "statistics." msgstr "" #: ../orchestration.rst:323 msgid "" ":code:`ceilometer_statistics_query`: shows the statistics used to trigger " "the alarms." msgstr "" #: ../orchestration.rst:325 msgid "These queries provide a view into the behavior of the stack." msgstr "" #: ../orchestration.rst:327 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:335 msgid "In your SSH session, confirm that no fractals were generated:" msgstr "" #: ../orchestration.rst:346 msgid "Then, create a pair of large fractals:" msgstr "" #: ../orchestration.rst:352 msgid "" "In the Terminal window where you run ceilometer, run :code:" "`ceilometer_sample_query` to see the samples." msgstr "" #: ../orchestration.rst:367 msgid "" "The CPU utilization across workers increases as workers start to create the " "fractals." msgstr "" #: ../orchestration.rst:369 msgid "" "Run the :code:`ceilometer_statistics_query`: command to see the derived " "statistics." msgstr "" #: ../orchestration.rst:383 msgid "The samples and the statistics are listed in opposite time order!" msgstr "" #: ../orchestration.rst:385 msgid "See the state of the alarms set up by the template:" msgstr "" #: ../orchestration.rst:397 msgid "" "Run the :code:`nova list` command to confirm that the :code:`OS::Heat::" "AutoScalingGroup` has created more instances:" msgstr "" #: ../orchestration.rst:413 msgid "" "Now, wait until all the fractals are generated and the instances have idled " "for some time." msgstr "" #: ../orchestration.rst:416 msgid "" "Run the :code:`nova list` command to confirm that the :code:`OS::Heat::" "AutoScalingGroup` removed the unneeded instances:" msgstr "" #: ../orchestration.rst:430 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:434 msgid "In the outputs section of the stack, you can run these web API calls:" msgstr "" #: ../orchestration.rst:436 msgid "" ":code:`scale__workers_up_url`: A post to this url will add worker instances." msgstr "" #: ../orchestration.rst:437 msgid "" ":code:`scale_workers_down_url`: A post to this url will remove worker " "instances." msgstr "" #: ../orchestration.rst:439 msgid "" "These demonstrate how the Ceilometer alarms add and remove instances. To use " "them:" msgstr "" #: ../orchestration.rst:446 msgid "To recap:" msgstr "" #: ../orchestration.rst:448 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:454 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:457 msgid "The prefix is `metering.` For example, `metering.some_name`." msgstr "" #: ../orchestration.rst:466 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:474 msgid "For example:" msgstr "" #: ../orchestration.rst:481 msgid "The alarms have the form:" msgstr "" #: ../orchestration.rst:487 msgid "" "Spend some time playing with the stack and the Fractal app to see how it " "works." msgstr "" #: ../orchestration.rst:489 msgid "" "The message queue can take a while to notice that worker instances have died." "" msgstr "" #: ../orchestration.rst:494 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:181 msgid "Extra security groups" msgstr "" #: ../scaling_out.rst:183 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:215 msgid "A floating IP helper function" msgstr "" #: ../scaling_out.rst:217 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:249 msgid "Split the database and message queue" msgstr "" #: ../scaling_out.rst:251 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:284 msgid "Scale the API service" msgstr "" #: ../scaling_out.rst:286 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:291 msgid "" "Armed with a security group, image, and flavor size, you can add multiple " "API services:" msgstr "" #: ../scaling_out.rst:321 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:326 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 `_ to do that " "automatically. However, OpenStack networking can provide Load Balancing as a " "Service, which :doc:`/networking` explains." msgstr "" #: ../scaling_out.rst:338 msgid "Scale the workers" msgstr "" #: ../scaling_out.rst:340 msgid "To increase the overall capacity, add three workers:" msgstr "" #: ../scaling_out.rst:368 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:373 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:383 msgid "Verify that we have had an impact" msgstr "" #: ../scaling_out.rst:385 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:393 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:396 msgid "Use the :code:`faafo create` command to generate fractals." msgstr "" #: ../scaling_out.rst:398 msgid "" "Use the :code:`faafo list` command to watch the progress of fractal " "generation." msgstr "" #: ../scaling_out.rst:401 msgid "Use the :code:`faafo UUID` command to examine some of the fractals." msgstr "" #: ../scaling_out.rst:403 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:453 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:458 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:462 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:469 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:473 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:478 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:486 msgid "" "You should be fairly confident about starting instances and distributing " "services from an application among these instances." msgstr "" #: ../scaling_out.rst:489 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:497 msgid "" "Go to :doc:`/durability` to learn how to use Object Storage to solve this " "problem in an elegant way. Or, you can proceed to one of these sections:" msgstr "" #: ../scaling_out.rst:511 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 ""