You are on page 1of 6
sopaz07 How to Install and Configure a Flask Dev & Deploy Environment How to Install and Configure a Python Flask Dev & Deploy Environment SETEMaER 10,2012 BY ANCE WER TTSWRLOG OFENSHIFECOMALTHORIANGELANERAN Camm} < some Why this Tutorial? Last winter wanted to arn anew programming guage and I chose Python (psu python org. Wve been attending many Python elated meetups & prtipating in nackatnons in Ply and NYC wis the intention af expaning my Python sks As Iwas scouring he Net fr Pyehan related torial and information fund loss a very useful intrmatlon that enable me o get Soll foundation ofthe Python language. Most of the tts ana how tread were primary related to learning and wring console appitions (005/Termnal console app). Ate eeling comfortable enough with Python Il waned to start wring wee apoliations. When researching how to write apps in Python was smacked inthe face with aton ef options Uriike the corsole apps was wring Iebecame apparento re that wring web apps using Python s more complex an involved, researehedthe more popu Python web rame works lke Dango psn cjangoproject. co) Pyramia ilpyramidreadthedoes or) Flak (tp:askpaco0.07) and Rote hp/batepxor) I wanted use a framework hat would Be easy a wseearh Wich as tle dependencies and restietions as possible Ae all my research and experimenting chose the ask ramework as my weapon ef choice, has small fect print ana dacent documentation, ‘ter picked Faskas my web famenork| realized that needed a place to hast my app onlin. Normally would ust spin up a witual server on my privat tual hostand eeate anew instance o* Apacte on a Linux sever that | would have to manage and maintain forthe fe of my app. Ne Been inthe If game for quite some ‘ime now and Im defintely nt sown with adsing or managing arymore servers than| already have, Coinisentaly | met two very friendly and helfulRedHat dveloperevaretss ats hackshan in NYC and they introduced me to the Platform as a Seve (aa) called OpenShit htos//openshitredhat.comapp you dont know and ae asking ourse What Is Openshift I allows developers and software engineers to basicaly create tua servers deploy and host ther apps on tre web. st ofall it's ee and its compatible wth mary ofthe current opan source programming languages, ramaworks and databases. This sence is [reat for devs tke me whe dont want to perform double duty as ys admin and developer, OpenShit takes care ofthe system administration which frees yu upto focus on your apps. Aryway we will use OpenShit(htpsd/opershi redhat. compa ohest ou app in thi tutorial ‘aw that Openshit became thehome for my app needed estar aring Flask, ound very ite tutorials tht covered Flask hey wre alliten by developers which in my opinian tend to assume the readers have roe knowledge then they actualy do, The fie lgrted ane! decided to write a grassroots tutorial for people tke myself that want learn how to wrte web apps n python and hast ton a PaaS Ike Opershit. Let's Get started - Prep Our Dev Box for some PaaS action Now we needa prepare or boxbut before we at there a few things | asume tha you area wth + Youwil need an active internet conection + Thsttoria assumes you ae sing a Linux 5 (preter ane ofthese Fedora hputedoraprojet.or, Debian ttpshaww debian or) or Ubunty (hepbomuuntu.com. + You row what terminal console, command ine (ip//etlarncedethehardayorp/Book) is Ao when Ist commands for yout runin the console he $ symbals should not be typed or include inthe commang, just represers the bash prompt ‘ou should have avery sie understancing ofthe GIT version contol system (hitpi/ptsem com) and how to use Use the GIT Does hep semcomibock/en Getting Stara} or this tonal ftp iw vogelacomvanides/Givarvcle nem to eam base Gif commands. More Impertanl lear what ‘version conta i Plenty of GIT materi onthe eb, so 3 sere "assume that you have 3 basicunderstanaing of programming in Python (hepa python or, HTML hepiwnseneclsconvhemldatauasp) SS Utepitv a3senoo comvesiceul asp) &ovaSeript (pin 38chook om detau asp) UavaSerpt ot so important or hist) youre not familar then cee links and learner, Create your app's home in the “Cloud!” using the OpenShift PaaS. + create your FREE Operhit account Here hips/muw opens. comepp/accountinen) Very Simple sign-up emall password only + neal the Openshit Chen Tok (ntes/mmwopenchtcom/developersistallte-clenetools, Use these direction or your parscular Operating System ‘hese tools have acomman line ncerface and alow more centrol over your app, The Opensht tel requires an stallion of Ruby. \Wreninstaling Ruby on nu recommend that you us the Ruby Version Manager htpssrmo/rvmvins.al) instructions that wrote inthe Other Sources of Reference Material section atthe bottom of the pe. ner tsmcpont nb ne Ottmann yn pnt Danese wr mean wre rernon ea anh Sa renote odd upstreon

You might also like