hitachi hyper scale-out platform (hsp) openstack swift

22
Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift Installation and Configuration Guide MK-95HSP018-00 30 August 2016

Upload: others

Post on 19-Oct-2021

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Hitachi Hyper Scale-Out Platform (HSP)OpenStack Swift Installation and Configuration Guide

MK-95HSP018-0030 August 2016

Page 2: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

© 2016 Hitachi, Ltd. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or by any means, electronic ormechanical, including photocopying and recording, or stored in a database or retrieval system forcommercial purposes without the express written permission of Hitachi, Ltd., or Hitachi Data SystemsCorporation (collectively, “Hitachi”). Licensee may make copies of the Materials provided that any suchcopy is: (i) created as an essential step in utilization of the Software as licensed and is used in no othermanner; or (ii) used for archival purposes. Licensee may not make any other copies of the Materials."Materials" mean text, data, photographs, graphics, audio, video and documents.

Hitachi reserves the right to make changes to this Material at any time without notice and assumes noresponsibility for its use. The Materials contain the most current information available at the time ofpublication.

Some of the features described in the Materials might not be currently available. Refer to the most recentproduct announcement for information about feature and product availability, or contact Hitachi DataSystems Corporation at https://support.hds.com/en_us/contact-us.html.

Notice: Hitachi products and services can be ordered only under the terms and conditions of the applicableHitachi agreements. The use of Hitachi products is governed by the terms of your agreements with HitachiData Systems Corporation.

By using this software, you agree that you are responsible for:

1) Acquiring the relevant consents as may be required under local privacy laws or otherwise fromauthorized employees and other individuals to access relevant data; and

2) Verifying that data continues to be held, retrieved, deleted, or otherwise processed in accordance withrelevant laws.

Notice on Export Controls. The technical data and technology inherent in this Document may besubject to U.S. export control laws, including the U.S. Export Administration Act and its associatedregulations, andmay be subject to export or import regulations in other countries. Reader agrees tocomply strictly with all such regulations and acknowledges that Reader has the responsibility to obtainlicenses to export, re-export, or import the Document and any Compliant Products.

Hitachi is a registered trademark of Hitachi, Ltd., in the United States and other countries.

AIX, AS/400e, DB2, Domino, DS6000, DS8000, Enterprise Storage Server, eServer, FICON, FlashCopy,IBM, Lotus, MVS, OS/390, PowerPC, RS6000, S/390, System z9, System z10, Tivoli, z/OS, z9, z10, z13,z/VM, and z/VSE are registered trademarks or trademarks of International Business Machines Corporation.

Active Directory, ActiveX, Bing, Excel, Hyper-V, Internet Explorer, the Internet Explorer logo, Microsoft,the Microsoft Corporate Logo, MS-DOS, Outlook, PowerPoint, SharePoint, Silverlight, SmartScreen, SQLServer, Visual Basic, Visual C++, Visual Studio, Windows, the Windows logo, Windows Azure, WindowsPowerShell, Windows Server, the Windows start button, andWindows Vista are registered trademarks ortrademarks of Microsoft Corporation. Microsoft product screen shots are reprinted with permission fromMicrosoft Corporation.

All other trademarks, service marks, and company names in this document or web site are properties oftheir respective owners.

Page 3: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Contents

Preface vIntended audience viProduct version viRelease notes viDocument revision level viDocument conventions viiAccessing product documentation viiGetting help viiiComments viii

Keystone server andOpenStack Swift 1Keystone server workflow with OpenStack Swift 2

Configure and initialize the system 3Before you begin 4Configure the Keystone server 5

Procedure 5Configure HSP with the Keystone details 5

Procedure 5Initialize Swift on HSP 7

Procedure 7

Swift Client 9Use the Swift client 10

Sample Swift commands 10Stat the Swift cluster 10Upload a file to container c1, create c1 if it does not exist 10

Contents iii

OpenStack Swift Installation and Configuration Guide

Page 4: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

List a container 10Download files from a container 10

Logs 11

iv Contents

OpenStack Swift Installation and Configuration Guide

Page 5: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Preface

This document describes and provides instructions for installing andconfiguring OpenStack Swift on Hitachi Hyper Scale-Out Platform (HSP).

Please read this document carefully to understand how to use this product,and maintain a copy for reference purposes.

❒ Intended audience

❒ Product version

❒ Document revision level

❒ Document conventions

❒ Accessing product documentation

❒ Getting help

❒ Comments

Preface v

OpenStack Swift Installation and Configuration Guide

Page 6: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Intended audience

This document is intended for system administrators, Hitachi Data Systemsrepresentatives, and authorized service providers who want to install andconfigure OpenStack Swift on an HSP cluster.

Readers of this document should be familiar with the following:

• Swift administration

• Keystone server administration

• Linux operating system and working in a restricted shell environment

• Site specific network information

Product version

This document applies to Hyper Scale-Out Platform release 1.2 or later.

Release notes

The release notes for this product are available on Hitachi Data SystemsSupport Connect: https://support.hds.com/en_us/contact-us.html.Read the release notes before installing and using this product. They maycontain requirements or restrictions that are not fully described in thisdocument or updates or corrections to this document.

Document revision level

Revision Date Description

MK-95HSP018-00 30 August 2016 Initial release

Intended audience

vi Preface

OpenStack Swift Installation and Configuration Guide

Page 7: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Document conventionsThis document uses the following typographic conventions:

Convention Description

<Italic> in anglebrackets

Indicates a variable, which is a placeholder for site- or installation-specific details that you need to provide. For example:copy <source-file> <target-file>

monospace Indicates text that is displayed on the screen or text that you needto enter. For example:

# pairdisplay -g oradb

Also, the name of a directory, folder, or file. For example:

The horcm.conf file…

This document uses the following icons to draw attention to information:

Icon Meaning Description

Note Calls attention to important or additional information.

Caution Warns that failure to take or avoid a specified action couldresult in adverse conditions or consequences (for example,loss of access to data).

Accessing product documentation

Product documentation is available on Hitachi Data Systems SupportConnect: https://knowledge.hds.com/Documents. Check this site for themost current documentation, including important updates that may havebeen made after the release of the product.

Document conventions

Preface vii

OpenStack Swift Installation and Configuration Guide

Page 8: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Getting help

Hitachi Data Systems Support Portal is the destination for technicalsupport of products and solutions sold by Hitachi Data Systems. To contacttechnical support, log on to Hitachi Data Systems Support Connect forcontact information: https://support.hds.com/en_us/contact-us.html.

Hitachi Data Systems Community is a global online community for HDScustomers, partners, independent software vendors, employees, andprospects. It is the destination to get answers, discover insights, and makeconnections. Join the conversation today! Go to community.hds.com,register, and complete your profile.

Comments

Please send us your comments on this document:

[email protected]

Include the document title and part number, including the revision (forexample, -01), and refer to specific sections and paragraphs wheneverpossible. All comments become the property of Hitachi Data Systems.

Thank you!

Getting help

viii Preface

OpenStack Swift Installation and Configuration Guide

Page 9: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Keystone server and OpenStack Swift

This chapter gives an overview of Keystone workflow with OpenStack Swift.

❒ Keystone server workflow with OpenStack Swift

Keystone server and OpenStack Swift 1

OpenStack Swift Installation and Configuration Guide

1

Page 10: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Keystone server workflow with OpenStack Swift

When a client interacts with Swift it initially uses the Keystone server IPaddress. The Keystone server then provides the client with the IP address ofthe Swift server and allows transparent communication with the Swiftserver. This workflow can be seen in the following diagram.

2 Keystone server and OpenStack Swift

OpenStack Swift Installation and Configuration Guide

Keystone server workflow with OpenStack Swift

Page 11: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Configure and initialize the system

This chapter describes the procedure for configuring Keystone server,OpenStack Swift server, and initializing Swift.

❒ Before you begin

❒ Configure the Keystone server

❒ Configure HSP with the Keystone details

❒ Initialize Swift on HSP

Configure and initialize the system 3

OpenStack Swift Installation and Configuration Guide

2

Page 12: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Before you begin

Verify that you have:

• An initialized HSP cluster running HSP version 1.2 or later

• Swift clients available in Ubuntu 14.04 and Ubuntu 16.06 are supported

• A Keystone server meeting the following requirements (most of theseare default requirements compatible with all other OpenStack services):¡ Keystone Mitaka (tested and recommended), Keystone Version 2 is

also supported¡ A tenant called “service” must exist¡ A user called “swift” who belongs to the service tenant must exist¡ A role called “admin” with admin privileges must exist¡ The user called “swift”' must have an “'admin” role in the service

tenant¡ A user called “escale” with the password “escale” must exist¡ The user called “escale” must have an “admin” role in the service

tenant¡ The admin port for Keystone should be 35357 (default for keystone)¡ Keystone must have endpoints configured pointing at the HSP

cluster Virtual IP address. See Configure the Keystone server fordetails.

4 Configure and initialize the system

OpenStack Swift Installation and Configuration Guide

Before you begin

Page 13: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Configure the Keystone server

Procedure

1. Add three endpoints to Keystone for the HSP cluster.Using root access run the following command on the keystone server.

Where, for example:• SWIFT_MASTER = 196.3.123.456 (any front end IP address of the

HSP cluster, use the HSP cluster Virtual IP address initially)

• KEYSTONE_REGION = RegionOne

openstack endpoint create --region RegionOne object-store publichttp://196.3.123.456:8080/v1/AUTH_%\(tenant_id\)s

openstack endpoint create --region RegionOne object-store internalhttp://196.3.123.456:8080/v1/AUTH_%\(tenant_id\)s

openstack endpoint create --region RegionOne object-store adminhttp://196.3.123.456:8080/v1

2. Copy the Keystone admin_token from the Keystone server.This token will be used when configuring HSP.

The Keystone admin_token is in the keystone.conf file located here:

/etc/keystone/keystone.conf

Configure HSP with the Keystone details

Procedure

1. Tell HSP about the Keystone server and the Keystone admin_token.

a. Check the current information held by HSP.Login as the cluster admin and run the following command on one ofthe HSP nodes.

hspadm openstack-config list

Configure and initialize the system 5

OpenStack Swift Installation and Configuration Guide

Configure the Keystone server

Page 14: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

This should display nothing in the Keystone Auth Server URLand Admin Token columns to show that nothing configured asshown in the example result below:

Example Result:

b. Configure the Keystone server IP address and Keystoneadmin_token

Caution:The Keystone admin_token entered in the following command mustexactly match the token copied from the Keystone server. If the tokens donot match Swift will not work and will need to be reinstalled and the systemmay need to be reinstalled.

Using admin access run the following command on one of the HSPnodes.

hspadm openstack-config edit --auth-url http:/<keystoneIP:5000>/v3 --admin-token <keystone token>

Note:If you are using version 2 of the Keystone server substitutehttp:/<keystoneIP:5000/v2.0/ in the command above.

This should display the correct Keystone Auth Server URL andKeystone Admin Token similar to the example result shown below.

Example Result:

6 Configure and initialize the system

OpenStack Swift Installation and Configuration Guide

Configure HSP with the Keystone details

Page 15: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Initialize Swift on HSP

This procedure links the Swift VMs with the Keystone server, brings theSwift VMs up, and configures IP forwarding.

Procedure

1. Initialize Swift on HSP.Using cluster admin access run the following command on one of theHSP nodes.

Note:The following command only needs to be run on a single HSP node.

swift_init; echo $?

2. Swift will now be initialized on the HSP cluster.

Configure and initialize the system 7

OpenStack Swift Installation and Configuration Guide

Initialize Swift on HSP

Page 16: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

8 Configure and initialize the system

OpenStack Swift Installation and Configuration Guide

Page 17: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Swift Client

This chapter describes the Swift client and details some sample commandsfor the Swift client.

❒ Use the Swift client

Swift Client 9

OpenStack Swift Installation and Configuration Guide

3

Page 18: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Use the Swift client

The Swift clients packaged in Ubuntu 14.04 and Ubuntu 16.06 aresupported.

If you have a Swift client setup, create the file (below) on that server.

Note:The following sample Swift commands assume you have sourced a file withthe following contents.

#!/bin/bashexport OS_PROJECT_DOMAIN_NAME=defaultexport OS_USER_DOMAIN_NAME=defaultexport OS_PROJECT_NAME=adminexport OS_USERNAME=adminexport OS_PASSWORD=<password for admin user in keystone>export OS_AUTH_URL=http://<keystoneIP>:35357/v3export OS_IDENTITY_API_VERSION=3export OS_IMAGE_API_VERSION=2

Sample Swift commands

Stat the Swift cluster

swift –v stat

Upload a file to container c1, create c1 if it does not exist

swift upload c1 <filename>

List a container

swift –v list c1

Download files from a container

swift –v download c1

10 Swift Client

OpenStack Swift Installation and Configuration Guide

Use the Swift client

Page 19: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Logs

Keystone stores its logs on the keystone server at:

/var/log/keystone/keystone.log

Swift will report any problems with Keystone on the node in its own logs at:

/var/log/syslog

Swift Client 11

OpenStack Swift Installation and Configuration Guide

Use the Swift client

Page 20: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

12 Swift Client

OpenStack Swift Installation and Configuration Guide

Page 21: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

OpenStack Swift Installation and Configuration Guide

Page 22: Hitachi Hyper Scale-Out Platform (HSP) OpenStack Swift

Hitachi Data Systems

Corporate Headquarters2845 Lafayette StreetSanta Clara, California 95050-2627U.S.A.www.hds.com

Regional Contact Information

Americas+1 408 970 [email protected]

Europe, Middle East, and Africa+44 (0) 1753 [email protected]

Asia Pacific+852 3189 [email protected]

MK-95HSP018-00