<commit_before><?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
    xml:id="configuring-openstack-object-storage-with-s3_api">
    <title>Configure Object Storage with the S3 API</title>
    <para>The Swift3 middleware emulates the S3 REST API on top of
        Object Storage.</para>
    <para>The following operations are currently supported:</para>
    <itemizedlist>
        <listitem>
            <para>GET Service</para>
        </listitem>
        <listitem>
            <para>DELETE Bucket</para>
        </listitem>
        <listitem>
            <para>GET Bucket (List Objects)</para>
        </listitem>
        <listitem>
            <para>PUT Bucket</para>
        </listitem>
        <listitem>
            <para>DELETE Object</para>
        </listitem>
        <listitem>
            <para>GET Object</para>
        </listitem>
        <listitem>
            <para>HEAD Object</para>
        </listitem>
        <listitem>
            <para>PUT Object</para>
        </listitem>
        <listitem>
            <para>PUT Object (Copy)</para>
        </listitem>
    </itemizedlist>
    <para>To use this middleware, first download the latest
        version from its repository to your proxy
        server(s).</para>
    <screen><prompt>$</prompt> <userinput>git clone https://github.com/fujita/swift3.git</userinput></screen>
    <para>Optional: To use this middleware with Object Storage 1.7.0 and previous versions, you must
        use the v1.7 tag of the fujita/swift3 repository. Clone the repository, as shown previously,
        and run this command:</para>
    <screen><prompt>$</prompt> <userinput>cd swift3; git checkout v1.7</userinput></screen>
    <para>Then, install it using standard python mechanisms, such
        as:</para>
    <screen><prompt>#</prompt> <userinput>python setup.py install</userinput></screen>
    <para>Alternatively, if you have configured the Ubuntu Cloud
        Archive, you may use:
        <screen><prompt>#</prompt> <userinput>apt-get install swift-python-s3</userinput></screen></para>
    <para>To add this middleware to your configuration, add the <systemitem>swift3</systemitem>
        middleware in front of the <systemitem>swauth</systemitem> middleware, and before any other
        middleware that look at Object Storage requests (like rate limiting).</para>
    <para>Ensure that your <filename>proxy-server.conf</filename> file contains
            <systemitem>swift3</systemitem> in the pipeline and the <code>[filter:swift3]</code>
        section, as shown below:</para>
    <programlisting language="ini">[pipeline:main]
pipeline = healthcheck cache swift3 swauth proxy-server

[filter:swift3]
use = egg:swift3#swift3</programlisting>
    <para>Next, configure the tool that you use to connect to the
        S3 API. For S3curl, for example, you must add your
        host IP information by adding your host IP to the
        @endpoints array (line 33 in s3curl.pl):</para>
    <literallayout class="monospaced">my @endpoints = ( '1.2.3.4');</literallayout>
    <para>Now you can send commands to the endpoint, such
        as:</para>
    <screen><prompt>$</prompt> <userinput>./s3curl.pl - 'myacc:myuser' -key mypw -get - -s -v http://1.2.3.4:8080</userinput>
        </screen>
    <para>To set up your client, the access key will be the concatenation of the account and user
        strings that should look like test:tester, and the secret access key is the account
        password. The host should also point to the Object Storage storage node's hostname. It also
        will have to use the old-style calling format, and not the hostname-based container format.
        Here is an example client setup using the Python boto library on a locally installed
        all-in-one Object Storage installation.</para>
    <programlisting>connection = boto.s3.Connection(
    aws_access_key_id='test:tester',
    aws_secret_access_key='testing',
    port=8080,
    host='127.0.0.1',
    is_secure=False,
    calling_format=boto.s3.connection.OrdinaryCallingFormat())</programlisting>
</section><commit_msg>Swift3 has moved to stackforge<commit_after><?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
    xml:id="configuring-openstack-object-storage-with-s3_api">
    <title>Configure Object Storage with the S3 API</title>
    <para>The Swift3 middleware emulates the S3 REST API on top of
        Object Storage.</para>
    <para>The following operations are currently supported:</para>
    <itemizedlist>
        <listitem>
            <para>GET Service</para>
        </listitem>
        <listitem>
            <para>DELETE Bucket</para>
        </listitem>
        <listitem>
            <para>GET Bucket (List Objects)</para>
        </listitem>
        <listitem>
            <para>PUT Bucket</para>
        </listitem>
        <listitem>
            <para>DELETE Object</para>
        </listitem>
        <listitem>
            <para>GET Object</para>
        </listitem>
        <listitem>
            <para>HEAD Object</para>
        </listitem>
        <listitem>
            <para>PUT Object</para>
        </listitem>
        <listitem>
            <para>PUT Object (Copy)</para>
        </listitem>
    </itemizedlist>
    <para>To use this middleware, first download the latest
        version from its repository to your proxy
        server(s).</para>
    <screen><prompt>$</prompt> <userinput>git clone https://github.com/stackforge/swift3.git</userinput></screen>
    <para>Then, install it using standard python mechanisms, such
        as:</para>
    <screen><prompt>#</prompt> <userinput>python setup.py install</userinput></screen>
    <para>Alternatively, if you have configured the Ubuntu Cloud
        Archive, you may use:
        <screen><prompt>#</prompt> <userinput>apt-get install swift-python-s3</userinput></screen></para>
    <para>To add this middleware to your configuration, add the <systemitem>swift3</systemitem>
        middleware in front of the <systemitem>swauth</systemitem> middleware, and before any other
        middleware that look at Object Storage requests (like rate limiting).</para>
    <para>Ensure that your <filename>proxy-server.conf</filename> file contains
            <systemitem>swift3</systemitem> in the pipeline and the <code>[filter:swift3]</code>
        section, as shown below:</para>
    <programlisting language="ini">[pipeline:main]
pipeline = healthcheck cache swift3 swauth proxy-server

[filter:swift3]
use = egg:swift3#swift3</programlisting>
    <para>Next, configure the tool that you use to connect to the
        S3 API. For S3curl, for example, you must add your
        host IP information by adding your host IP to the
        @endpoints array (line 33 in s3curl.pl):</para>
    <literallayout class="monospaced">my @endpoints = ( '1.2.3.4');</literallayout>
    <para>Now you can send commands to the endpoint, such
        as:</para>
    <screen><prompt>$</prompt> <userinput>./s3curl.pl - 'a7811544507ebaf6c9a7a8804f47ea1c' -key '<KEY>' -get - -s -v http://1.2.3.4:8080</userinput>
        </screen>
    <para>To set up your client, ensure you are using the ec2 credentials,
        which can be downloaded from the <guilabel>API Endpoints</guilabel> tab
of the dashboard.
        The host should also point to the Object Storage storage node's hostname. It also
        will have to use the old-style calling format, and not the hostname-based container format.
        Here is an example client setup using the Python boto library on a locally installed
        all-in-one Object Storage installation.</para>
    <programlisting>connection = boto.s3.Connection(
    aws_access_key_id='a7811544507ebaf6c9a7a8804f47ea1c',
    aws_secret_access_key='<KEY>',
    port=8080,
    host='127.0.0.1',
    is_secure=False,
    calling_format=boto.s3.connection.OrdinaryCallingFormat())</programlisting>
</section>
{'fraction_non_alphanumeric': 0.11740890688259109, 'fraction_numerical': 0.020488283646178385, 'mean_word_length': 2.957281553398058, 'pattern_counts': {'":': 0, '<': 221, '<?xml version=': 2, '>': 221, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 10}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5042647', 'n_tokens_mistral': 2530, 'n_tokens_neox': 2404, 'n_words': 699}