33
Virtual Private Servers alex chojnacki

Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

VirtualPrivateServersalexchojnacki

Page 2: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

Thehistoryofcomputinginanutshell1. Beganwithdumbterminalsattachedtosmartmainframes

Page 3: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

Thehistoryofcomputinginanutshell1. Beganwithdumbterminalsattachedtosmartmainframes

2. Movedtostrongerindividualcomputers,"PC's"

Page 4: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

Thehistoryofcomputinginanutshell1. Beganwithdumbterminalsattachedtosmartmainframes

2. Movedtostrongerindividualcomputers,"PC's"

3. Backtodumbdevicesconnectedtosupercomputers.

Whatcanyouevendoonaphonewithnointernetconnection?

Page 5: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

WhatisaVPS?

Page 6: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

WhatisaVPS?Okay,yeah,it'sa"virtualprivateserver"...

Page 7: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

WhatdoesWikipediasayaboutit?"AVPSrunsitsowncopyofanoperatingsystem,andcustomershavesuperuser-levelaccesstothatoperatingsysteminstance,sotheycaninstallalmostanysoftwarethatrunsonthatOS.Formanypurposestheyarefunctionallyequivalenttoadedicatedphysicalserver,andbeingsoftware-defined,areabletobemuchmoreeasilycreatedandconfigured."--Wikipedia

Page 8: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

WhatdoesWikipediasayaboutit?"AVPSrunsitsowncopyofanoperatingsystem,andcustomershavesuperuser-levelaccesstothatoperatingsysteminstance,sotheycaninstallalmostanysoftwarethatrunsonthatOS.Formanypurposestheyarefunctionallyequivalenttoadedicatedphysicalserver,andbeingsoftware-defined,areabletobemuchmoreeasilycreatedandconfigured."--Wikipedia

AdvantagesTheyareeasilyconfigurable...Wecanmakeasmanyaswewant...Wecanmakethemaspowerfulasweneed...Wecancreateanddestroytheminstantly...

Page 9: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,
Page 10: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

HowdoImakeone?

Page 11: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

VagrantA"headless"VMProvisioningsupportbuilt-inOftentimesmoreconvenientwithouttheGUIProvisioningmechanism

thealex::$vagrantinithashicorp/precise64

...

thealex::$vagrantup

...

thealex::$vagrantssh

Page 12: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

VagrantA"headless"VMProvisioningsupportbuilt-inOftentimesmoreconvenientwithouttheGUIProvisioningmechanism

thealex::$vagrantinithashicorp/precise64

...

thealex::$vagrantup

...

thealex::$vagrantssh

Whyisprovisioningcool?::WhatifIwanttomake50VMsatonceandtheyallneedthesameconfig?

Page 13: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

DockerA"lightweight"VMQuickerthanvagrant,butmuchlesscontained

Wherevagrant/virtualboxvirtualisethehardware,dockerutilizesaclevernamespacetrickinordertorunprocessesin'isolated'environmentswhileavoidinganyhardwarevirtualisation.

Richecosystemofthird-partyimagesandenvironments

dockerrun-itubuntubash

Page 14: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

DockerA"lightweight"VMQuickerthanvagrant,butmuchlesscontained

Wherevagrant/virtualboxvirtualisethehardware,dockerutilizesaclevernamespacetrickinordertorunprocessesin'isolated'environmentswhileavoidinganyhardwarevirtualisation.

Richecosystemofthird-partyimagesandenvironments

dockerrun-itubuntubash

AWS,Linode,DigitalOcean,etc.Disposableserversinthecloud!

Page 15: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

Alright,sowhatcanIdowiththem?

Page 16: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

Alright,sowhatcanIdowiththem?Hostpersonalwebsite/appTemporarily"rent"amorepowerfulPCHostchatbotslikeGitHub's hubot

Page 17: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

Alright,sowhatcanIdowiththem?Hostpersonalwebsite/appTemporarily"rent"amorepowerfulPCHostchatbotslikeGitHub's hubot

Useyourimagination!

Page 18: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

WhywouldIeveruseAWSforcomputepower?

Page 19: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

WhywouldIeveruseAWSforcomputepower?Ihearneuralnetworksarealltherage...http://arxiv.org/pdf/1508.06576v2.pdf

https://github.com/jcjohnson/neural-style

Page 20: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

Installingdependenciesluarocksinstallsys

luarocksinstallimage

luarocksinstallloadcaffe

luarocksinstalltorch

exportLD_LIBRARY_PATH=/home/ubuntu/torch-distro/install/lib:/home/ubuntu/torc

h-distro/install/lib:/home/ubuntu/cudnn-6.5-linux-x64-v2-rc2

#clonetheprojectandinstall

gitclonehttps://github.com/jcjohnson/neural-style

cdneural-style

shmodels/download_models.sh

Page 21: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

Installingdependenciesluarocksinstallsys

luarocksinstallimage

luarocksinstallloadcaffe

luarocksinstalltorch

exportLD_LIBRARY_PATH=/home/ubuntu/torch-distro/install/lib:/home/ubuntu/torc

h-distro/install/lib:/home/ubuntu/cudnn-6.5-linux-x64-v2-rc2

#clonetheprojectandinstall

gitclonehttps://github.com/jcjohnson/neural-style

cdneural-style

shmodels/download_models.sh

Whatis luarocks ?Whatis exportLD_LIBRARY_PATH doing?Whatabouttheshcommand?

Page 22: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

Howdowegetmyimageontotheserver?

emailittomyself?Clickanddragtothe...juststop--no.

Page 23: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

Howdowegetmyimageontotheserver?

emailittomyself?Clickanddragtothe...juststop--no.

scp !

scp-i~/Downloads/[email protected]

1.amazonaws.com:neural-style/output.png.

maybeevenapythonwebserver... http://52.70.134.147

Page 24: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

CardDemo

Page 25: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

CardDemoProblem

Wroteabunchofnoteswith word::definition pairs

Wantedaflashcardapponmyphone

Page 26: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

CardDemoProblem

Wroteabunchofnoteswith word::definition pairs

Wantedaflashcardapponmyphone

SolutionSimpleprojectusingnode.js,mongo,express.js

Writteninanafternoon

Page 27: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

CardDemoProblem

Wroteabunchofnoteswith word::definition pairs

Wantedaflashcardapponmyphone

SolutionSimpleprojectusingnode.js,mongo,express.js

Writteninanafternoon

...ortwo.

Page 28: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

CardDemoProblem

Wroteabunchofnoteswith word::definition pairs

Wantedaflashcardapponmyphone

SolutionSimpleprojectusingnode.js,mongo,express.js

Writteninanafternoon

...ortwo.

Page 29: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

AfewnotesabouttheclassFromthefirstslideofthecourse...

##Whatthisclassisabout

-Thisisnot"ToolsforComputerScientists"

-Though,wewillcoveralotofcooltools

-Thegoalistogiveyoutheabilitytopickup,learn,andusetoolseffective

ly

Hopefully...

...you'vefollowedaguideandneededtoimprovise.

Page 30: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

AfewnotesabouttheclassFromthefirstslideofthecourse...

##Whatthisclassisabout

-Thisisnot"ToolsforComputerScientists"

-Though,wewillcoveralotofcooltools

-Thegoalistogiveyoutheabilitytopickup,learn,andusetoolseffective

ly

Hopefully...

...you'vefollowedaguideandneededtoimprovise.

...you'velearnedatoolortwothatsurprisedyou.

Page 31: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

AfewnotesabouttheclassFromthefirstslideofthecourse...

##Whatthisclassisabout

-Thisisnot"ToolsforComputerScientists"

-Though,wewillcoveralotofcooltools

-Thegoalistogiveyoutheabilitytopickup,learn,andusetoolseffective

ly

Hopefully...

...you'vefollowedaguideandneededtoimprovise.

...you'velearnedatoolortwothatsurprisedyou.

...you'remoreconfidentapproachingnewproblems.

Page 32: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

AfewnotesabouttheclassFromthefirstslideofthecourse...

##Whatthisclassisabout

-Thisisnot"ToolsforComputerScientists"

-Though,wewillcoveralotofcooltools

-Thegoalistogiveyoutheabilitytopickup,learn,andusetoolseffective

ly

Hopefully...

...you'vefollowedaguideandneededtoimprovise.

...you'velearnedatoolortwothatsurprisedyou.

...you'remoreconfidentapproachingnewproblems.

Youknowmorethanyouthinkyouknow,andnothingonacommandlineishard...

Page 33: Virtual Private Servers - GitHub Pages · 2019-08-02 · "A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance,

AfewnotesabouttheclassFromthefirstslideofthecourse...

##Whatthisclassisabout

-Thisisnot"ToolsforComputerScientists"

-Though,wewillcoveralotofcooltools

-Thegoalistogiveyoutheabilitytopickup,learn,andusetoolseffective

ly

Hopefully...

...you'vefollowedaguideandneededtoimprovise.

...you'velearnedatoolortwothatsurprisedyou.

...you'remoreconfidentapproachingnewproblems.

Youknowmorethanyouthinkyouknow,andnothingonacommandlineishard...

...thesecondtime...