Skull-Engine: Getting Started

Table of Contents

Halloween

After introducing Skull, this time let’s see how to install and use Skull to create a Skull project.

Install Skull

As mentioned in Introduction, Skull includes 3 majors parts: skull-core, skull-apis and skull-scripts. To play with it, we need to install Skull first, then use Skull commands to create/manage a Skull project.

And as we expected, Skull can not only work in the big data center, but also in the resource very limited environment(embedded device), like Raspberry Pi, follow me to see how to do that :)

Install Dependencies

datacenter

In generally Skull is working in the Data Center, with powerful x86 CPUs and enough RAM. For example, here we use Ubuntu14.04 as an example.

sudo apt-get install autoconf valgrind expect libyaml-dev python-dev python-pip libprotobuf-dev protobuf-compiler libprotobuf-c0-dev protobuf-c-compiler

sudo pip install PyYAML protobuf pympler WebOb

git clone git@github.com:finaldie/skull.git
cd skull
git submodule update --init --recursive
make dep
sudo make install-dep

Build and Install

make -j4
sudo make install

After that, Skull has installed into the system, type skull we would see:

final@ubuntu1404: ~>skull
Skull 0.9.10 - A fast to start, easy to maintain, high productive serving framework.
More information see https://github.com/finaldie/skull

usage:
\_ skull create
\_ skull config
\_ skull common
\_ skull workflow
\_ skull module
\_ skull service
\_ skull build
\_ skull deploy
\_ skull start
\_ skull version
\_ skull help

Now, Skull is ready to play with it then :)

Install Skull in Raspberry Pi

raspberry pi

Above shows Skull is working fine in normal Linux releases, but in the embedded device, like Raspberry Pi, the situation is totally different. It only has a ARMv6 processor(32bit) with only 384MB RAM(Model B), the good news is, Skull is totally 32bit compatible, it’s working perfectly in this environment, let’s see how to fit Skull into Raspberry :)

To make it works, we have to disable the jemalloc memorypool, since it has some compiling problems in this environment, the rests are simple and easy:

# Install dependencies packages
sudo apt-get install autoconf valgrind expect libyaml-dev python-dev python-pip libprotobuf-dev protobuf-compiler libprotobuf-c0-dev protobuf-c-compiler

sudo pip install PyYAML protobuf pympler WebOb

# Clone Skull
git clone git@github.com:finaldie/skull.git
cd skull
git submodule update --init --recursive

# Build Skull dependency libraries
make dep disable_jemalloc=true
sudo make install-dep

# Build Skull itself
make -j4 disable_jemalloc=true
sudo make install

OK, right now we are all set, type skull to verify the Skull commands are working fine here.

Basic flow

After installing Skull, let’s create a basic Skull project, which only need few steps:

  • skull create project
  • skull workflow --add
  • skull module --add
  • skull service --add (optional)

OK, here we created an simple example project with one default module with it:

Play With It

After we created above, by default the Skull project is a echo-back server, we can play with it by running:

  • skull build
  • skull deploy
  • skull start

Last

From above we can see, it’s really easy and fast to create a Skull project, the default Module is a good start point of exploring the basic functionality of Skull.

Further more, we can create more modules/services, timers/endpoints, to communicate them with each other, use the background IO and monitoring, etc. A lot of funs are waiting there. For more information we can find it here, and welcome to send me some feedbacks, let’s do it better :)

Project Link