We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

How to Deploy a Plone Cookiecutter Project

00:00

Formale Metadaten

Titel
How to Deploy a Plone Cookiecutter Project
Serientitel
Anzahl der Teile
20
Autor
Lizenz
CC-Namensnennung 3.0 Deutschland:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
David Glick shows how to deploy a Plone project created with the Plone cookiecutter.
FehlermeldungMomentenproblemWeb SiteWeb-SeiteDatenverarbeitungssystemRechnernetzComputerFirewallProxy ServerSpielkonsoleVolumenWiederherstellung <Informatik>MultigraphLeistung <Physik>SicherungskopieKernel <Informatik>ROM <Informatik>Mini-DiscTransitionssystemBefehlsprozessorBandmatrixTropfenMetrisches SystemZeitzoneDomain <Netzwerk>VerschlingungSampler <Musikinstrument>Direkte numerische SimulationKonfigurationsraumStrom <Mathematik>DefaultCookie <Internet>DokumentenserverDirekte numerische SimulationDatensatzVirtueller ServerDienst <Informatik>NetzadresseDomain <Netzwerk>Virtuelle MaschineProjektive EbeneInternetworkingWeb SiteServerKlon <Mathematik>FehlermeldungMultiplikationsoperatorAutomatische HandlungsplanungXMLComputeranimation
EbeneCOMSpannungsmessung <Mechanik>CodeFramework <Informatik>GammafunktionSkeleton <Programmierung>DokumentenserverOrdnung <Mathematik>Front-End <Software>Bildgebendes VerfahrenCookie <Internet>Debugging
Elektronische PublikationMereologieTemplateStellenringKlon <Mathematik>Bildgebendes VerfahrenDatenbankProgrammierumgebungDienst <Informatik>KonfigurationsraumBenutzerbeteiligungWeb SiteServerGruppenoperationCookie <Internet>Wurzel <Mathematik>DefaultRegulärer GraphBasis <Mathematik>VariableProzess <Informatik>KonfigurationsdatenbankAggregatzustandBitInternetworkingSchnittmengePunktRadikal <Mathematik>QuellcodeInstallation <Informatik>DebuggingPublic-Key-KryptosystemDomain-NameATMEinfache GenauigkeitMultiplikationsoperatorOrtsoperatorVirtuelle MaschineKontextbezogenes SystemFront-End <Software>Mailing-ListeRechter WinkelSoftwareXML
GammafunktionLemma <Logik>FehlermeldungFront-End <Software>BrowserProgramm/Quellcode
Schreib-Lese-KopfPrimidealStellenringGoogolMarketinginformationssystemUnternehmensarchitekturContent ManagementDomain <Netzwerk>LastServerTaskE-MailMultiplikationSoftwarewartungSicherungskopieComputeranimation
Transkript: English(automatisch erzeugt)
Hello! Welcome to World Plone Day and my talk on how to deploy a Plone cookie cutter project. My name is David Glick. I've been a member of the Plone community for a long time, and I wanted to show you how to get your Plone project that you're running locally up onto the public internet. So my goal here is to deploy a Plone site to wpd2023.glicksoftware.com,
which is my domain. And just to show you that I'm not cheating, I'm gonna try to load this here and just show that we're currently getting an error. So I've done a couple things to prepare here. I have a virtual server running on DigitalOcean. You can use one somewhere else.
It just needs to be a server that runs Ubuntu, Linux, and that you can SSH into. So I started this up and got the IP address. I've also set up DNS so that I can access it at the wpd2023 subdomain. So I created a record here with that IP address. You can use whichever DNS service
you use for your domain. And I verified that I can SSH into the machine. I've also created a repository called wpd2023 in my GitHub account. I used the Plone cookie cutter,
the Plone starter. So I have cookie cutter. I ran this command to create the template repository, and then I checked it into a Git repository and pushed it up to GitHub. When I did that, it includes some automation that builds images. So I have these packages
that show up here, the front end and the back end, which are the two images that we need in order to deploy Plone. All right. So let's do the actual deployment now. I'm going to go into my repository here and into the DevOps folder. Now, there's a few
files that I already created, which were not part of the template. So let me show you those. The first one is in the groupvars users. I added my public key here. This is going to create a Plone user and I want to make sure that I can SSH in. So I need my
public key. I also need in the inventory. What we're doing here is we're going to run an Ansible playbook that installs Docker and creates a user and does some other basic setup of the machine.
And so we need to target a particular host. The cookie cutter comes with a dev configuration. I've added a prod.yaml and I gave the name prod and then I configured it so that the host has my host name. We're using port 22, which is the usual SSH port and the root user
so that Ansible knows where to connect when I run the playbook. And then the other thing I added was dot m underscore prod, which is going to set up some environment variables that will help control the process. So we're deploying to the prod or we're
calling this environment prod. This is the host name. We're using port 22 and we're going to create this Plone user and that's what we're going to use to do our deployments then on a regular basis. FQDN is the fully qualified domain name where the site will be available
on the internet and then we can leave alone the settings after that. So I'm going to open up my terminal and source dot m prod just to load those environment variables and now I can run the
playbook. There's a makefile command that will kick that off. So this is now connecting to my prod server from the inventory and it's running all the steps in the playbook that do the basic setup. So it's going to install the base packages, it will set up that user, it will install docker
and set up docker as a docker swarm. Docker swarm is really for if you have multiple servers that you want to have a cluster of docker images on. We're just going to run it in a mode where there's there's a single docker swarm node because then it's in a good position to scale up later if we
need it to. This might take a little bit longer when you run it. I already ran it on the machine once so it's just kind of checking that everything is already in place. All right so at this point that's something you should only need to do once when you set up your
server. Now I can ssh in as the clone user wpd2023 click software.com And we're in and docker is running although we aren't actually running any particular containers
in docker yet. So I'm going to jump back out of the server. Now we're going to do a deployment. We're going to deploy a docker stack to the remote server. Now normally when I run docker on a Now normally when I run docker on a machine it's just controlling the local docker.
But docker has a thing called context which allows it to control docker somewhere else. So currently we just have a default context. I'm going to run make docker setup which is going to add another one for us. And now if I look at the the list of contexts again I can see we have a prod context.
And when I run the deploy command in the in a second it's going to use that one. So let me do make deploy. And this is going to deploy the stack which is defined in
the plone.yml file over here. And this just defines the different services in which images they'll use. So we have traffic which is the front-end web server. We have our plone front-end image. This is the custom image that was built that I showed you on GitHub. We have one of those for the back-end as well. And then we have Postgres running as the database.
So I will run make deploy and now docker is deploying that stack to the remote docker running on the server. And now that's done although not everything has probably started up yet.
I'm going to check the status with make status. And this shows us the various containers that are running. So we have two back-end containers, one db container, two front-end containers, and one traffic container
that are in the process of starting up. You can see here the desired state is running, the current state is preparing. So let me just monitor this for a little bit. It looks like traffic finished coming up. The others are still preparing which probably means that it's like pulling those images from the GitHub container registry since I hadn't done
that before. Now this this may take a minute or two to come up. When you first create a clone site and the back-end container comes up it actually writes some things
in the database to create the site and that can take a little bit of time. Our database is now up. Now the back-ends are starting. We'll see if this works.
Well it will work it's just a question of how long. Okay we are back and now the back-ends have finally started up
and so I'm going to go show you in the browser. I can go to the domain that was broken before and now it loads and it is blown. And I guess I'm logged in here because I was testing this earlier but I can
log back in just to show you that this is actually working. And add a title and there we have it. So this is a basic deployment. There's plenty of things that can go
into making a robust deployment after this. Setting up backups, multiple nodes, various maintenance tasks, outgoing email, etc etc. But this at least shows the basics of
getting your server up and running. Thank you very much.