Ho sentim, aquesta pàgina no està disponible en català. Te la mostrem en anglès.

Descàrrega i instal·lació

Woost is open source software, and can be freely downloaded by anyone. The CMS is divided into two packages: Woost itself, which contains everything specific to the CMS; and Cocktail, its underlying web development framework. Both projects are hosted at BitBucket:

On the following sections we will go over the steps required to install the code and create a working instance of the CMS.

The installation script

The installation of Woost can be an involved process, requiring quite a few dependencies and steps. In order to streamline this, we provide a script that does all the work for you. So far it only works on Debian / Ubuntu (tested on Ubuntu 14.04 and 16.04); we may extend it to support other platforms in the future.

Downloading the script

The first step is to download the installation script. You must download and save the script (typically, by right clicking the link and choosing Save link as, or by opening it and pressing ctrl + s).

Bootstraping the system

Now that we have downloaded the script, we will use it to install the preliminary requisites needed to complete the installation process. We'll do that by opening a terminal and applying the script's bootstrap command:

python bootstrap

This should be done once on each host where you intend to host a Woost website. So if you are creating or deploying a second website on the same host, you can safely skip this step (and don't fear, running it twice is innocuous).

Creating a new project

Next, we will create our brand new website. To do so we will use the script's new command. Here's an example:

python make MyProject \
    --workspace /path/to/your/workspace \
    --hostname mydomain \
    --language en fr de \
    --admin-email \
    --admin-password MyP4ssw0rd

As you can see, the make command takes a lot of parameters. Lets go over each of them:

  • MyProject is the name of the project you want to create. This will be used as the name of the folder containing the project's structure, and to name some classes and packages in the generated source code. As such, it should be a name that uniquely identifies your project, written in TitleCase.
  • The --workspace /path/to/your/workspace parameter tells the installer where it should place the folder for your project. Typically you'll want to use the path to the folder where you store all your development projects. If you don't have one, just choose the path that you prefer. Note that you can also set this parameter by setting a WORKSPACE environment variable.
  • --hostname should specify the hostname that you will use to access this website. If you are not running your own DNS server, you may want to use the --modify-hosts-file option and invent any hostname you want.
  • --language should be a list of the languages you want your website to be available in. Languages are indicated using ISO-639-1 codes. Note that you can add further languages after the installation is complete.
  • --admin-email should be set to the email address of the administrator user, which you will use to access the site's backoffice. If you don't supply this parameter, the script will ask you to input it during the installation.
  • --admin-password indicates the password for the administrator user. Again, the script will prompt you for it if you don't specify this parameter. Note that neither method is specially secure; you probably want to specify a temporary password and use the backoffice to change it right away.

If everything goes according to plan, the script should set off to work and begin downloading, installing and compiling all the pieces required to run your project.

Launching your project

Once the installation is complete, you are ready to launch your website. Woost websites require launching two different processes in order to work: the database server and the web server.

If you have gnome-terminal installed, the script will have created a handy launcher for you that will start your website with a single click. Look for it on your applications menu (should be named like your project).

The launcher opens a terminal with several tabs:

  • The first tab holds the database server (ZEO). Here you can see the database log, or shut down the database (by pressing ctrl + c), if you need to do some maintenance.
  • The second tab contains the application's web server. By default, this tab will display HTTP requests and your application's standard output.
  • The next three tabs are regular shell sessions, with their working directory set to the folders containing the source code for Cocktail, Woost and your own project. Note that you also get COCKTAIL, WOOST and SITE environment variables pointing to these folders.
  • The final tab holds an iPython session of your project script. This provides convenient programatic access to your project's database.

With the launcher running, just point your web browser to your chosen hostname. If everything went well, you should see your new website, with a link to the site's backoffice.