Successfully reported this slideshow.
Your SlideShare is downloading. ×

PyCon APAC 2016: Django, Flask 고민없이 개발하고 서비스하는 PaaS, IBM Bluemix

More Related Content

Related Books

Free with a 30 day trial from Scribd

See all

PyCon APAC 2016: Django, Flask 고민없이 개발하고 서비스하는 PaaS, IBM Bluemix

  1. 1. IBM Bluemix Django, Flask 고민없이 개 발하고 서비스하는 PaaS, IBM Bluemix Jin Gi KONG, 공진기 Bluemix Technical Evangelist PyCon APAC 2016
  2. 2. IBM Bluemix 목차 • Flask on Bluemix • Django on Bluemix • Bluemix 소개 • Python on IBM • IBM and Developer
  3. 3. IBM Bluemix 누구? • Bluemix Technical Evangelist • ShopST • 구매대행 스타트업 • Django • Twisted • Celery + RabbitMQ • PostgreSQL • Android ROM 개발 • 이것저것 조금씩 • Network admin • Server admin • Development • Security • Mobile • IoT • Cognitive science
  4. 4. IBM Bluemix Flask on Bluemix
  5. 5. IBM Bluemix Flask 표준유형
  6. 6. IBM Bluemix Flask 표준유형 - 데모
  7. 7. IBM Bluemix Django on Bluemix
  8. 8. IBM Bluemix Django on local • 노란색 글씨는 적절히 변경하면 됩니다. $pip install Django==1.8 $django-admin startproject pyconkr_jgkong $cd pyconkr_jgkong $./manage.py syncdb $./manage.py runserver
  9. 9. IBM Bluemix Python buildpack • Procfile • 앱 시작시 사용할 명령어 • ex) web: python manage.py runserver 0.0.0.0:$VCAP_APP_PORT • Procfile 존재시 Python buildpack 이 자동으로 선택 • requirements.txt • 앱 배포시 필요한 pip 패키지 목록 • pip freeze > requirements.txt • manifest.yml • Cloud Foundry 실행시 사용하는 설정파일 • name, memory, host, domain 등 설정 가능
  10. 10. IBM Bluemix Django Bluemix 로 올려보기 • 붉은색 글씨는 겹치지 않는 이름으로 반드시 변 경해야 합니다. $echo "web: python manage.py runserver 0.0.0.0:$VCAP_APP_PORT" > Procfile $echo "Django==1.8" > requirements.txt $echo "STATIC_ROOT = os.path.join(BASE_DIR, 'static')" >> pyconkr_jgkong/settings.py $cf login -a api.ng.bluemix.net $cf push pyconkr-jgkong
  11. 11. IBM Bluemix Django WSGI with gunicorn $echo "web: gunicorn pyconkr_jgkong.wsgi -- workers 3 -b 0.0.0.0:$VCAP_APP_PORT" > Procfile $echo gunicorn >> requirements.txt $cf push pyconkr-jgkong
  12. 12. IBM Bluemix Django Static file: dj_static.Cling $echo dj_static >> requirements.txt • pyconkr_jgkong/wsgi.py $cf push pyconkr-jgkong import os from django.core.wsgi import get_wsgi_application from dj_static import Cling os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pyconkr_jgkong.settings") application = Cling(get_wsgi_application())
  13. 13. IBM Bluemix Django Static file: 별도 인스턴스 $./manage.py collectstatic --noinput $cf push pyconkr-jgkong-static -b https://github.com/cloudfoundry/staticfile- buildpack -p static • settings.py 의 STATIC_URL 수정 $cf push pyconkr-jgkong STATIC_URL = '//pyconkr-jgkong-static.mybluemix.net/'
  14. 14. IBM Bluemix Bluemix 정리
  15. 15. IBM Bluemix ©IBMCorporation 1 5
  16. 16. IBM Bluemix ©IBMCorporation 산, 바다, 계곡 캠핑장 글램핑 호텔Traditional IT Infrastructure a s a Service Platform as a S ervice Software as a S ervice 1 6 일상을 벗어난 캠핑 - 선택 옵션들 사이트 데크 텐트 그릴 바비큐 맥주 사이트 데크 텐트 그릴 바비큐 맥주 사이트 데크 텐트 그릴 바비큐 맥주 사이트 데크 텐트 그릴 바비큐 맥주
  17. 17. IBM Bluemix ©IBMCorporation 1 7 Complete Flexibility between PaaS and IaaS Customer Managed Service Provider Managed … delivered as a public, dedicated, or on-premises implementation. Infrastructure as a Service Code Data Runtime Middleware OS Virtualization Servers Storage Networking Code Data Runtime Middleware OS Virtualization Servers Storage Networking Platform as a Se rvice Code Data Runtime Middleware OS Virtualization Servers Storage Networking Code Data Runtime Middleware OS Virtualization Servers Storage Networking Traditional IT Software as a S ervice
  18. 18. IBM Bluemix ©IBMCorporation 1 8 How does Bluemix work? Bluemix is underlined by three key open compute technologies: Cloud Foundry, Docker, and OpenStack. It extends each of these with a growing number of services, robust Dev Ops tooling, integration capabilities, and a seamless developer experience. Your Own Hosted Apps / Services Bluemix Public Powered by IBM SoftLayer Platform Deployment Options that Meet Your Workload Requirements Bluemix Dedicated Bluemix Local In Your Data Center Instant Runtimes + Containers + Flexible Compute Options to Run Apps / Services Virtual Machines + DevOps Tooling + Integration a nd API Mgmt + Catalog of Services that Extend Apps’ Functionality Web Data Mobile AnalyticsCognitive IoT Security Yours + On the IBM SoftLayer Cloud
  19. 19. IBM Bluemix Free trial & Free tier? • Free trial 30일 • 등록 후 30일동안 뭘 해도 청구 0원 • 체험 및 테스트 기간 • Free tier • 앱 및 서비스마다 제공되는 무료 사용 구간 • 앱: 375GB*H • 512M 짜리 앱 한개, 혹은 256M 짜리 앱 두개를 한달 내내 돌 릴 수 있는 양 • 개인 홈페이지나 간단한 테스트 개발 가능 • 기타 서비스도 대부분 Free tier 제공 • 네트워크 비용: 0원
  20. 20. IBM Bluemix Python on IBM
  21. 21. IBM Bluemix Python Runtime
  22. 22. IBM Bluemix Watson Developer Cloud https://www.ibm.com/watson/developercloud/language-translation/api/v2/#translate
  23. 23. IBM Bluemix IBM and Developer
  24. 24. IBM Bluemix developerWorks 한국 기술 포럼 https://developer.ibm.com/kr/cloud/bluemix/
  25. 25. IBM Bluemix SmartCamp 2016, coming soon http://smartcamp2016.com/
  26. 26. IBM Bluemix Bluemix Meetup https://www.facebook.com/events/905982122847028/
  27. 27. IBM Bluemix Cognitive Cloud Connect http://www-903.ibm.com/kr/ibmcloudcenter/
  28. 28. IBM Bluemix Links • Bluemix 문서 https://new-console.ng.bluemix.net/docs/ • developerWorks https://developer.ibm.com/kr/cloud/ • Bluemix Facebook User group https://www.facebook.com/groups/BluemixStudy

×