2017 © Pedro Peláez
 

project honeybee-agavi-cmf-demo

Demo project for building content-management applications, based on Agavi and the Honeybee CQRS library.

image

honeybee/honeybee-agavi-cmf-demo

Demo project for building content-management applications, based on Agavi and the Honeybee CQRS library.

  • Thursday, October 8, 2015
  • by shrink
  • Repository
  • 4 Watchers
  • 6 Stars
  • 9 Installations
  • Ruby
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

The Honeybee-Agavi Content Management Framework (CMF) is based on the Honeybee CQRS and Event Sourcing library which includes framework bindings for the Agavi MVC framework. It provides a modular and scalable application infrastructure to facilitate construction of sophisticated content managment systems (CMS) while supporting a Domain Driven Design (DDD) methodology., (*1)

This project is in active development. Changes may be frequent until releases are provided., (*2)

Installation

Installation of an application can be done directly from this project repository following the instructions provided., (*3)

This demo application was created from the honeybee-agavi-cmf-project repository., (*4)

Installing the application inside a VM

These instructions detail the procedure for boostrapping your application on a virtual machine (VM). The VM will be provisioned and configured with the required environment for Honeybee applications., (*5)

Prerequisites

  • VirtualBox - https://www.virtualbox.org/wiki/Downloads
  • git - https://git-scm.com
  • vagrant - http://downloads.vagrantup.com
  • composer - https://getcomposer.org/download
  • A Github account and repository for your application
  • Some knowledge of the Agavi MVC framework is advantageous

Creating a new project

Creating a project with composer will guide you through configuring a project and VM for a new application. We ignore platform requirements because the project will be installed inside the VM., (*6)

# replace the last argument with your chosen folder name if required
composer create-project -sdev --ignore-platform-reqs --no-install \
honeybee/honeybee-agavi-cmf-demo honeybee-agavi-cmf-demo

The repository will be cloned and a post-install script will be executed which will prompt you with some simple configuration questions., (*7)

  • When asked for a Github repository you should pick a repository name that you have write access to and is accessible by your VM. Your application will need to be pushed to this repository so the VM can launch, clone and install.
  • When asked to configure a VM you should answer yes
  • When asked for a hostname, you can accept the default based on your repository name or choose another HTTPS URL instead, where your application will be hosted inside the VM.
  • When asked by composer if you wish to keep the VCS files, you may answer no

Initialising your repository

Your application is now configured and ready for committing to your own repository. Detailed instructions on creating new repositories on Github from source can be found here. We have summarised the commands as follows:, (*8)

# first create repository at github
cd honeybee-agavi-cmf-demo
git init
git add .
git commit -m 'Initialising project'
# replace the following Github repository url with your own
git remote add origin git@github.com:honeybee/honeybee-agavi-cmf-demo.git
git push -u origin master

Launching the VM

When your new repository is publicly available, the VM is ready to launch. When the VM is first initialised, it will clone the Github repository you just created. You can start the machine with the following commands:, (*9)

cd honeybee-agavi-cmf-demo/dev/box
vagrant up
# please wait, the virtual machine will be downloaded and installed
# provisioning can take up to 30 minutes depending on resources

You will see console output as the machine image is downloaded and provisioned. During the provisioning you maybe prompted for input and can accept the default in all cases., (*10)

Completing installation

When your VM is up and running you can finish installation by executing the following commands:, (*11)

vagrant ssh
cd /srv/www/honeybee-agavi-cmf-demo.local
composer install 
# when prompted you should accept the project installation
sudo service nginx restart

The application will install all dependencies and build all required resources. This may take several minutes., (*12)

Accessing the CMS

When successfully setup the application should be accessible at:, (*13)

https://honeybee-agavi-cmf-demo.local/, (*14)

At this point it is ready for use and development, however it will not contain any data at this point. If you have not created a Honeybee application before we recommend that you review the [cookbook][5]. The cookbook will guide you through the creation of a demo application from scratch, explaining many of the concepts you will need to know to build applications on this framework., (*15)

Alternatively you may wish to intialise the application from scratch as explained here, (*16)

Mounting the source

  • Mac OSX:
    • In the Finder menu:
      • Select Connect to Server... (⌘K)
      • Enter the following address: nfs://honeybee-agavi-cmf-demo.local/srv/www/
  • Ubuntu/Linux:
    • mount honeybee-agavi-cmf-demo.local:/srv/www/ /home/${USER}/projects/honeybee-agavi-cmf-demo

Controlling system services

The following main services are running on the VM and are controlled via systemd:, (*17)

  • Couchdb
    • http-endpoint: http://honeybee-agavi-cmf-demo.local:5984
    • web-client: http://honeybee-agavi-cmf-demo.local:5984/_utils
  • Elasticsearch
    • http-endpoint: http://honeybee-agavi-cmf-demo.local:9200
    • web-client: http://honeybee-agavi-cmf-project.demo:9200/_plugin/head
  • Converjon
    • http-endpoint: https://honeybee-agavi-cmf-demo.local/converjon
    • web-status: https://honeybee-agavi-cmf-demo.local/converjon/status

In order to start/stop services or get the status, use the corresponding sudo command within the VM., (*18)

sudo service couchdb status|start|stop|restart

Turning the VM on/off

Whenever possible stop the box with:, (*19)

vagrant suspend

and wake it up again using:, (*20)

vagrant resume

This will send the box asleep, instead of completely shutting it off and thus runs faster. The box's network interfaces are not reconfigured using suspend/resume though. For this the virtual machine needs to be completely rebooted, which can be done by calling:, (*21)

vagrant reload # is the same as: vagrant halt && vagrant up

Installation locally

Coming soon..., (*22)

Initialisation

When a Honeybee CMF project is first installed, the databases are not initialised and there is no data in the system., (*23)

Initialising the stores

System migrations are provided for creating administration users. We can execute all pending migrations and initialise the data stores using the following command:, (*24)

composer migration-run -- --all

On completion you will see a summary of which migrations were executed. There is no data in the system at this point., (*25)

Creating an administrative user

We can create an administration user with the following command., (*26)

composer user-create

The command will prompt for a user name and email address. Enter your choices following the command instructions, then follow instructions for setting a password. You may then login to the system at https://honeybee-agavi-cmf-demo.local/ with your newly created account., (*27)


User registration and email services

In normal user registration flows, users are sent account verification emails. In a development environment the mail service is stubbed and will not actually send emails., (*28)


The Versions