Ghost

Modified: 26 Sep 2019 21:20 UTC

The Joyent Ghost image is a SmartOS base64 image preconfigured with Ghost, a blogging platform application based on Node.

You can find more information about Ghost at their website



Overview

Ghost and its dependencies come pre-isntalled via the 'ghost' user running under the SMF service svc:/application/ghost:default.

Starting Ghost

By default the ghost and nginx services are disabled for security. After provisioning you will need to login as "admin" or "root" and enable the services:

    # ssh admin@<PUBLIC-IP>
    # svcadm enable pkgsrc/nginx
    # svcadm enable application/ghost

Then you can connect to http://<PUBLIC-IP>/ghost and create your Ghost user account.

You should receive an e-mail after creating this user. You may need to check your spam folder.

Ghost configuration

Application

The Ghost application is running under user ghost at /home/ghost with SMF service svc:/application/ghost:default. If you need to make any configuration changes you can ssh in as the ghost user (with ghost_pw metadata or the password provided for the ghost user via https://my.joyent.com) and edit /home/ghost/ghost/config.js. Memory usage of the ghost application can be monitored through prstat -J.

Database

Ghost is configured to use SQlite for it's database, which is the typical default configuration for Ghost.

Configure Ghost to use Percona

If you find you need a more robust database to run your blog you can easily configure Ghost to use Percona MySQL with the following steps. This will require more memory.

    # pkgin install percona-server percona-client percona-xtrabackup qpress quickbackup-percona innotop mytop
    # sm-create-db mysql ghost
    # sm-create-dbuser mysql ghost dbpass ghost

Then you need to add a block in your /home/ghost/ghost/config.js file to use the database we just created:

    database: {
      client: 'mysql',
      connection: {
        host     : '127.0.0.1',
        user     : 'ghost',
        password : 'dbpass',
        database : 'ghost',
        charset  : 'utf8'
      }
    },

Enable Percona and restart Ghost:

    # svcadm enable percona
    # svcadm restart ghost
Backing up Ghost with Quickbackup Percona

To backup the Ghost database all that's needed is a run of Quickbackup-percona. Quickbackup-percona is a backup service powered by Percona Xtrabackup.

    # quickbackup-percona backup

Backups are stored at /var/backups/percona.

To configure Quickbackup on a schedule see Joyent Quickbackup for Percona MySQL Server.

Proxy

Ghost is being proxied by Nginx (svc:/pkgsrc/nginx:default) from :80 to :2368 on localhost. If any additional configurations are needed they can be modified at /opt/local/etc/nginx/nginx.conf.

E-mail

Ghost e-mail is being delivered through postfix locally (svc:/pkgsrc/postfix:default). Any configurations needed can be made to /opt/local/etc/postfix/main.cf.

Version 15.x.x

15.1.2

Name ghost
Description A SmartOS 64-bit image pre-configured and optimized as a Ghost blogging platform (0.6.4) powered by Node.js (0.10.38).
UUID bcfdd92c-1f2f-11e5-8386-73310a2d6492
Based on base-64 15.1.1
Pkgsrc 2015Q1
What's new in this image

15.1.1

Name ghost
Description A SmartOS 64-bit image pre-configured and optimized as a Ghost blogging platform (0.6.4) powered by Node.js (0.10.38).
UUID c57cf1ae-0932-11e5-ba5c-1f51cbd3c12b
Based on base-64
Pkgsrc 2015Q1
What's new in this image
Software included in this image

Software installed as pkgsrc packages:

bzip2-1.0.6nb1
curl-7.42.0
db4-4.8.30
dtracetools-0.7
gcc47-4.7.4
gcc47-libs-4.7.4nb1
gtar-base-1.28nb1
htop-1.0.1
nginx-1.7.10
nodejs-0.10.38
openssl-1.0.2a
perl-5.20.2
pkgin-0.8.0
postfix-2.11.4
python27-2.7.9nb1
smtools-20150312
sqlite3-3.8.10
sudo-1.7.10p9
unzip-6.0nb4
wget-1.16.3
zoneinit-1.6.8

Software installed as npm packages:

json@9.0.3
manta@1.5.1
smartdc@7.3.1

Version 14.x.x

14.4.0

Name ghost
Description A SmartOS 64-bit image pre-configured and optimized as a Ghost blogging platform (0.5.10) powered by Node.js (0.10.36).
UUID fe9face0-cd84-11e4-b62f-6f2e40f4c75a
Based on base-64-lts 14.4.0
Pkgsrc 2014Q4
What's new in this image
Software included in this image

Software installed as pkgsrc packages:

bzip2-1.0.6nb1
curl-7.39.0nb1
db4-4.8.30
dtracetools-0.7
gcc47-4.7.3nb6
gcc47-libs-4.7.3nb7
gtar-base-1.28
htop-1.0.1
nginx-1.7.4
nodejs-0.12.0
openssl-1.0.1k
perl-5.20.1
pkgin-0.7.0
postfix-2.11.3
python27-2.7.9
smtools-20150226
sqlite3-3.8.7.4
sudo-1.7.10p9
unzip-6.0nb2
wget-1.16.1
zoneinit-1.6.8

Software installed as npm packages:

json@9.0.3
manta@1.5.0
smartdc@7.3.1

14.3.0

Name ghost
Description A SmartOS 64-bit image pre-configured and optimized as a Ghost blogging platform (0.5.5) powered by Node.js (0.10.33).
UUID 016c283e-7bd9-11e4-89c6-136624f3ba7e
Based on [base64 14.3.0](SmartMachine Base.html)
pkgsrc 2014Q3
What's new in this image
Software included in this image

Software installed as pkgsrc packages:

    bzip2-1.0.6nb1
    curl-7.38.0
    db4-4.8.30
    gcc47-4.7.3nb6
    gcc47-libs-4.7.3nb7
    gtar-base-1.28
    nginx-1.7.4
    nodejs-0.10.33
    openssl-1.0.1j
    perl-5.20.0nb2
    pkgin-0.6.4nb7
    postfix-2.11.1nb1
    python27-2.7.8nb1
    smtools-20141114
    sqlite3-3.8.6
    sudo-1.7.10p8
    unzip-6.0nb1
    wget-1.16
    zoneinit-1.6.8

Software installed as npm packages

    manta@1.4.5
    smartdc@7.3.0

14.2.0

Name ghost
Description A SmartOS 64-bit image pre-configured and optimized as a Ghost blogging platform (0.5.0) powered by Node.js (0.10.30).
UUID 6a3b115a-26fb-11e4-99d9-ff07ee6b5097
Based on [base64 14.2.0](Base Instance.html)
pkgsrc 2014Q2
What's new in this image
Software included in this image

Software installed as pkgsrc packages:

    bzip2-1.0.6nb1
    curl-7.37.0nb1
    db4-4.8.30
    gcc47-4.7.3nb5
    gcc47-libs-4.7.3nb4
    gtar-base-1.27.1nb1
    nginx-1.6.0
    nodejs-0.10.30
    openssl-1.0.1h
    perl-5.20.0nb1
    pkgin-0.6.4nb7
    postfix-2.11.1nb1
    python27-2.7.7nb2
    smtools-20140728
    sqlite3-3.8.5
    sudo-1.7.10p8
    unzip-6.0nb1
    wget-1.15nb2
    zoneinit-1.6.8

Software installed as npm packages

    jsontool@7.0.2
    manta@1.4.2
    smartdc@7.3.0

Version 13.x.x

13.4.2

Name ghost
Description A SmartOS 64-bit image pre-configured and optimized as a Ghost blogging platform (0.4.2) powered by Node.js (0.10.26).
UUID a2969206-d604-11e3-be79-dfd0c3676b44
Based on [base64 13.4.2](Base Instance.html)
pkgsrc 2013Q4
What's new in this release
Software included in this release
    bzip2-1.0.6nb1
    curl-7.33.0
    db4-4.8.30
    duo-unix-1.9.7
    gcc47-4.7.3nb1
    gcc47-libs-4.7.3nb3
    gtar-base-1.26nb2
    libarchive-2.8.4nb2
    nginx-1.5.7
    nodejs-0.10.26
    openssl-1.0.1fnb1
    perl-5.18.1nb3
    pkgin-0.6.4nb4
    postfix-2.10.2nb1
    python27-2.7.6nb1
    smtools-20140430
    sqlite3-3.8.2
    sudo-1.7.10p7
    unzip-6.0nb1
    wget-1.14nb3
    zoneinit-1.6.7

Software installed as npm packages:

    smartdc@7.2.1
    jsontool@7.0.2
    manta@1.2.6