레이블이 Swift인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Swift인 게시물을 표시합니다. 모든 게시물 표시

2014년 12월 10일 수요일

OpenStack Juno 정리

OpenStack Juno 릴리즈 정리

  • OpenStack은 매해 두번씩 새로운 버전이 릴리즈합니다.(4월, 10월)
  • 최신 안정판: 2014.2 (Juno)
  • 다음 안정판: 2015.1 (Kilo)

Juno (2014.2)

  • Juno는 미국 조지아주 아틀란타시 근교에 지명

  • 개발기간: 2014/5 ~ 2014/10
  • 개발항목: 340개소 이상
  • 버그수정: 약 3200개이상
  • 스택수 : 11개
    • Data Processing (Sahara) 추가
  • 5대 기여사 (Contribution Company)
    • 1. 20% HP
    • 2. 18% RedHat
    • 3. 13% Mirantis
    • 4. 10% Rackspace
    • 5.   8% IBM

OpenStack 정식 스텍 리스트

  • Swift : Object Storage 클라우드 스토리지
  • Nova : Compute 클라우드 컴퓨팅
  • Glance : Image Service 가상머신 템플릿 관리
  • Keystone : Identity 종합 사용자/테넌트등 인증
  • Horizon : Dashboard 사용자 서비스 포털
  • Neutron : Networking 클라우드 네트워크 가상화 관리
  • Cinder : Block Storage 볼륨 스토리지
  • Ceilometer: Telemetry 자원 모니터링, 운영 감시
  • Heat : Orchestration 클라우드 오케스트레이션
  • Trove : Database 클라우드 데이터베이스 DBaaS
  • Sahara : Data Processing 빅데이터 처리

OpenStack 육성 프로젝트

  • Ironic : Baremetal 물리머신 관리
  • Zaqar : Queue service (MQaaS)
  • Barbican : Key management 키 데이터 관리
  • Desinate : DNS service (DNSaaS)
  • Oslo : Common Libraries 각 프로젝트 공통 코드
  • TripleO : Deployment
  • Devstack : 개발자용 OpenStack 설치

Juno에서 추가된 새로운 기능들

  • Nova
    • RBAC
    • Evacuate Host
    • Console 개선
    • Flavor 추가 속성
    • Host metering
  • Glance
    • Image meta data 대응,
    • tag 대응
  • Neutron
    • RBAC
    • DVR/L3-HA
    • IPv6서브넷 대응
    • 프로바이더 네트워크 대응
  • Heat
    • RBAC
    • 스택 페이징
  • Cinder
    • 볼륨 형식 변경
    • 볼륨 확장 속성
    • 볼륨 QoS 속성
  • Keystone
    • RBAC 대응 사용자 환경
    • 사용자/도메인간 룰 추가
  • Trove
    • 증분 백업
  • Sahara
    • 전용 사용자 환경 추가 (Horizon)
    • 프로세스가 실행되는 대상에 대한 링크 추가

2014년 8월 23일 토요일

Openstack Swift Objectstore Access via FTP

This is a guide on accessing the Openstack Swift Object Storage system using an FTP client. Openstack Swift has a beautiful API which you can program to. However, sometimes it is handy to quickly be able to access your Swift/Objectstore data without programming around it. We will use ftp-cloudfs to do this. There is also Softlayers swftp, but that does not support Keystone Authentication (2.0). ftp-cloudfs does support this. The OS X Cyberduck FTP client also has Openstack Swift support, however that is a native implementation, not using FTP. With ftp-cloudfs we can use any ftp client, from Filezilla to midnight commander.
We will be using the Dutch provider CloudVPS, which is the first European-only Openstack Public Cloud, therefore not bound to the Patriot Act, so your data is more safe than it is with a provider that is vulnerable to the Patriot Act. CloudVPS provides 10GB free ObjectStore, if you have VPS with them, the data is stored on at least 3 machines in 3 locations and they have a boatload of certifications (ISO 27001 etc).
If you order a VPS or Objectstore at CloudVPS, please mention my name or this article. I'll get a little referal bonus, which will be used to keep this awesome website running.
Note that this article is not sponsored nor endorsed by CloudVPS, nor am I speaking for or as CloudVPS. They just happen to be the best Dutch Openstack provider.
Openstack is one of those cloudy cloud projects. Warning, keep your buzzword bingo cards ready for the Wikipedia definition:
OpenStack is a free and open-source software cloud computing platform. It is primarily deployed as an infrastructure as a service (IaaS) solution. The technology consists of a series of interrelated projects that control pools of processing, storage, and networking resources throughout a data center, able to be managed or provisioned through a web-based dashboard, command-line tools, or a RESTful API. It is released under the terms of the Apache License.
Basically it is a very nice project which provides an easy and scalable way to:
  1. Virtualize (Compute / Nova) (KVM, VMWare, Xen)
  2. Provide scalable object access (Swift / Objectstore) (like s3)
  3. Manage it all using a nice dashboard (Horizon)
  4. Have a great API which lets people develop applications for it.
  5. Be open source. There is no vendor lock in, you can switch between any provider providing OpenStack.
In this tutorial we will focus on the Swift part, which provides s3 like access to files, or, objects.
As said, Swift has a very nice API to program to. For example, you can create an app for a TV show which streams extra video related to the TV show. This will be a one time peak in traffic, depending on the TV show it can get pretty high in volume. You don't want to set up all the capacity yourself, including scaling, distributing files over multiple servers and load balancing it all. Swift handles this for you. You do need to program to it, there is not an easy way (yet) to access it in your file browser for example.
The project ftp-cloudfs solves this partly by acting as a proxy between the Object Store API and an FTP client. Installation is easy, it can all be done via pip.

Requirements

You will need the following:
  • access to an Openstack Swift instance (CloudVPS for example)
  • python 2.7
    • python-keystoneclient (if you are going to use v2.0 authentication)
    • python-swiftclient
  • an ftp client
This tutorial was written and tested on Ubuntu 12.04 and CentOS 6, but works everywhere the above requirements can be met.

Installing packages

We need to make sure we have python 2, pip and the keystone client installed. For Ubuntu/Debian:
apt-get install python-pip
For CentOS/RHEL:
yum install python-pip
Now we are going to install ftp-cloudfs, swiftclient and keystoneclient using pip. You should do this in a python virtualenv, however that goes beyond the scope of this tutorial.
pip install ftp-cloudfs python-keystoneclient python-swiftclient

Running the FTP server

When that is all finished we can start the ftp proxy like so:
ftpcloudfs --foreground --keystone-auth --auth-url https://identity.stack.cloudvps.com/v2.0
This will start up the FTP server in the foreground on port 2021, talking to the CloudVPSSwift Object Store.
ftp-cloudfs has the following usage options:
Usage: ftpcloudfs [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -p PORT, --port=PORT  Port to bind the server (default: 2021)
  -b BIND_ADDRESS, --bind-address=BIND_ADDRESS
                        Address to bind (default: 127.0.0.1)
  -a AUTHURL, --auth-url=AUTHURL
                        Authentication URL (required)
  --memcache=MEMCACHE   Memcache server(s) to be used for cache (ip:port)
  -v, --verbose         Be verbose on logging
  -f, --foreground      Do not attempt to daemonize but run in foreground
  -l LOG_FILE, --log-file=LOG_FILE
                        Log File: Default stdout when in foreground
  --syslog              Enable logging to the system logger (daemon facility)
  --pid-file=PID_FILE   Pid file location when in daemon mode
  --uid=UID             UID to drop the privilige to when in daemon mode
  --gid=GID             GID to drop the privilige to when in daemon mode
  --keystone-auth       Use auth 2.0 (Keystone, requires keystoneclient)
  --keystone-region-name=REGION_NAME
                        Region name to be used in auth 2.0
  --keystone-tenant-separator=TENANT_SEPARATOR
                        Character used to separate tenant_name/username in
                        auth 2.0 (default: TENANT.USERNAME)
  --keystone-service-type=SERVICE_TYPE
                        Service type to be used in auth 2.0 (default: object-
                        store)
  --keystone-endpoint-type=ENDPOINT_TYPE
                        Endpoint type to be used in auth 2.0 (default:
                        publicURL)
For CloudVPS, the username will be in the form of: TENANTNAME.EMAIL@ADDRESS.EXT. For example, BLA000066 Cinderella.user@example.org. If you have a tenant (tenant means project in Openstack terminology) with a dot in the name, you can use the--keystone-tenant-separator option to change it in, for example, a \ backslash.
Now use your FTP client to connect to the server and there's your Object Store. There are some limitations:
  • you can not place files in the top level folder, you need a subfolder. This is because top level are containers.
  • you can not rename a non-empty directory. You will get a550 Directory not empty. error.
  • you can not recursively delete a folder. That is handled by most clients, filezilla understands that it has to go in every folder and remove all the things and then remove the folder.
  • top level folders are created as private containers. You will need to change them to public if that is needed.
These limitations come from the fact that we are not talking to a file system block storage, but to object storage. Try to force a square through a circle, and then appreciate how well ftp-cloudfs handles this.
To set the ftp proxy open for other users, set the --bind-address to 0.0.0.0. Remember that there is no encryption on FTP, so make sure you handle that in a different way.

Authentication Data

If you are unsure about what data you should use to authenticate you can use theOpenstack API to get that data. Your provider may for example not have it in a logical place. The Openstack Horizon dashboard provides all the required data and URLs under the "Access and Security --> API Access".
First get an authentication token using cURL:
curl -i 'https://identity.stack.cloudvps.com/v2.0/tokens' -X POST -H "Content-Type: application/json" -H "Accept: application/json"  -d '{"auth": {"tenantName": "", "passwordCredentials": {"username": "user@example.com", "password": "passw0rd"}}}'
Response:
HTTP/1.1 200 OK
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 543
Connection: close

{
    "access": {
        "token": {
            "issued_at": "2014-05-19T03:24:50.971373",
            "expires": "2014-05-20T03:24:50Z",
            "id": "8g2CeQ3kM0tkRAEiu6KmGaI6M8NLFDJ8WQ"
        },
        "serviceCatalog": [],
        "user": {
            "username": "user@example.com",
            "roles_links": [],
            "id": "J0XPUWipImRpkFXAVxJYELAXnXx26jPPj9w",
            "roles": [],
            "name": "user@example.com"
        },
        "metadata": {
            "is_admin": 0,
            "roles": []
        }
    }
}
The token is the first id. In this case: 8g2CeQ3kM0tkRAEiu6KmGaI6M8NLFDJ8WQ.
Use the token to get a list of tenants for that token:
curl -i -X GET 'https://identity.stack.cloudvps.com/v2.0/tenants' -H "User-Agent: python-keystoneclient" -H "X-Auth-Token: 8g2CeQ3kM0tkRAEiu6KmGaI6M8NLFDJ8WQ"
Response:
HTTP/1.1 200 OK
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 523
Connection: close

{
    "tenants_links": [],
    "tenants": [
        {
            "handle": "HANDLE",
            "description": "HANDLE Projectname",
            "enabled": true,
            "id": "zORIDFV4ybpbV9bRg1gwNi7NNnTiCw",
            "name": "HANDLE Projectname"
        },
        {
            "handle": "HANDLE",
            "description": "Main Customer Tenant",
            "enabled": true,
            "id": "vnsdmwzPSl8dHm2RQQe",
            "name": "HANDLE"
        }
    ]
}
The part you want to have is the "name": "HANDLE Projectname" part. That is your tenant.

Screenshot

Here is a screenshot of Filezilla uploading a copy of this website to the Object Store:
filezilla

클라우드 오브젝트 스토리지 서비스 OpenStack Swift

클라우드 스토리지

클라우드 스토리지 (오브젝트 스토리지)

"클라우드"라는 말은 다양한 장르에서 사용되고 있지만,클라우드 스토리지 중 하나인 '클라우드 오브젝트 스토리지'가있다. 클라우드 스토리지라는 것은 그 이름에서 알 수 있듯이 인터넷을 통해 액세스 할 수 있는 데이터 저장 공간을 제공하는 것이다. 클라우드 스토리지에 저장된 데이터를 '객체'라고 부르기에서 "개체 스토리지 (Object Storage) '라고도 한다.

REST방식 교환

클라우드 스토리지가 일반적인 온라인 스토리지 서비스 및 NAS / SAN과 다른 것은 HTTP 기반의 REST 방식으로 데이터가 교환된다는 점이다. 저장된 데이터는 복제 된 여러 스토리지 서버에 저장되어 스토리지 서버의 일부가 정지했다고해도 데이터가 보호된다는 점이다. 비싼 전용 하드웨어가 필요없고, 일반적인 서버 및 스토리지의 조합만으로 고용량 안전한 스토리지 서비스를 구축 할 수 있다는 장점도있다.

Amazon S3

클라우드 스토리지에서 가장 유명한 것이 Amazon.com가 제공하는 "Amazon Web Services"의 하나 인 "Amazon Simple Storage Service (Amazon S3)」일 것이다. Amazon S3는 후속 서비스에 큰 영향을 미치고 Amazon S3 호환 API를 제공하는 클라우드 스토리지 서비스는 많다. 또한 Google의 "Google Cloud Storage"나 Microsoft의 'Windows Azure'등 서비스도 클라우드 스토리지 서비스를 제공하고있다.

OpenStack Swift

클라우드 스토리지 서비스를 오픈 소스를 이용해서 독자적으로 구축하기위한 소프트웨어가 "Swift"이다. Swift는 현재 클라우드 인프라를 구축하기위한 소프트웨어 개발 프로젝트 "OpenStack"의 일부로서 개발이 진행되고있다. 이러한 스토리지 시스템은 안정성이 중요하지만, Swift는 기존 기술을 조합 한 구조로되어 있으며 미국의 호스팅 서비스 사업자 Rackspace 의한 상용 서비스 'Cloud Files "에서 사용 된 기술을 기반하고있다. 큰 문제 등 지금까지보고되지 않고 이미 충분히 실용 단계에있는 소프트웨어라고 할 수있다.