KUSANAGI Provisioning

KUSANAGI Provisioning

Once you have completed initialization, you can provision KUSANAGI to run WordPress.

You can change the web server, database and WordPress settings using specialized commands.

KUSANAGI can do the provisioning for WordPress(default), Concrete5, Drupal8 and LAMP.

1. Run “kusanagi provision” command

To provision KUSANAGI, you can use the following commands.
If you do not specify the options, WordPress install as default, and the required settings are interactively selected.

KUSANAGI provisioning command:

# kusanagi provision [options] [profile name]

Type of provision
You can use [options] to choose the type of provision.

  • --WordPress is specified, then WordPress provisioned.
  • --concrete5 is specified, then concrete5 provisioned.
  • --drupal8 is specified, then Drupal8 provisioned.
  • --lamp is specified, then the configuration for using LAMP(Linux+NGINX+MySQL+PHP) or LEMP(Linux+NGINX+MySQL+PHP) provisioned.
  • --rails is specified, then Ruby on Rails provisioned. The profile name must be a valid name as the Rails project name.
  • --WooCommerce or --woo is specified, then it installs with WordPress, WooCommerce plugin and StoreFront theme.

To install WordPress by default, use the following command.
Example:
# kusanagi provision kusanagi_html

In the above example, the directory “/home/kusanagi/kusanagi_html/” will be generated, and the document root is created in this directory. Data needed for the installation of WordPress is stored here.

To specify the options, use the following command.
Example:
# kusanagi provision --WrodPress kusanagi_html

Example:
# kusanagi provision --concrete5 kusanagi_html

Target directory is /home/kusanagi/[Directory name].

The above message will appear. Please proceed to the next step.

2. WordPress language selection

If you choose WordPress as the provisioning type, you will select the language when WordPress is installed. Select en_US or ja interactively.

Choose the installation language of WordPress.

1 : en_US
2 : ja

q : quit

Which do you choose?

The language you had selected will be as follows.

You choose: ja

3. Set host name

Enter the hostname (FQDN) to be used in the profile to be created.

Enter hostname(fqdn) for your website. ex) kusanagi.tokyo

Example:
www.example.com
※Do not type in ‘http://’ and ‘/’.

Enter the same hostname again for confirmation.

Re-type hostname(fqdn) for your website.

4. Let’s Encrypt configuration

Issue an SSL certificate of Let’s Encrypt corresponding to the specified hostname.

Let’s Encrypt as certificate authority(CA) can issue「SSL/TLS server certificate」for free
please click here for more information official site
Type in your email address here to affirm you agree to use Let’s Encrypt

When setting Let’s Encrypt, the following message is displayed. Enter the email address interactively.

In order to use Let's Encrypt services, you must agree to Let's Encrypt's Term of Services.
If you agree this TOS, put in your e-mail adress, otherwise carriage enter key.
TOS of Let's Encrypt : https://letsencrypt.org/repository/

Type in your email address.
Example:kusanagi@example.com
Enter your email again when the following appears.

Re-type mail address.

If you do not use Let’s Encrypt, press the enter key twice.
※ Let’s Encrypt is a certificate for domain authorization. With using Let’s Encrypt, we could solve the FQDN’s name solution, at the same time, you no need required to access to http to authenticate. In addition, Let’s Encrypt has been determined the use limits in the domain’s units. You are not available to use FQDN which granted from while virtual machine created in cloud.
※ You are available to customize Let’s Encrypt after provision is done with kusanagi ssl commands. Please check kusanagi ssl documents for more details.

5. Set database name

Set the database name.
*Recommend not to use the name “test” for user name and database name.

Since the following message is displayed, enter an arbitrary database name interactively.

Enter the name of your database.

When entering the database name, it will be displayed as follows, so enter the database name again for confirmation.

Re-type database name you create.

The database name here will be used later for the installation configuration for WordPress, Concrete5 or Drupal8. Please be aware of this.

6. Set database user name

Enter a database user name for the database you created at step 5.

Since the following message is displayed, enter an arbitrary database user name interactively.

Enter user name for database 'The created database name'.

When entering the database user name, it will be displayed as follows, so enter the database name again for confirmation.

Re-type user name for database 'The created database name'.

7. Set database user password

Enter a database user password for the database user you created at step 6.

Enter password for database user 'Database user name'. USE [a-zA-Z0-9.!#%+_-] 8 characters minimum.

The following message will display after you enter the password. Please re-enter it to confirm.

Re-type password for database user 'Database user name'.

8. Complete provisioning

The following message will display once step 7 is complete.
Provisioning is now finished.
* The size and address will vary depending on the WordPress version. In addition, the screen will change depending on the language of CentOS.

Target directory is /home/kusanagi/sample03.
--2016-09-06 16:54:47--  https://ja.WordPress.org/latest-ja.tar.gz
Resolving ja.WordPress.org (ja.WordPress.org)... 66.155.40.250, 66.155.40.249
Connecting to ja.WordPress.org (ja.WordPress.org)|66.155.40.250|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8421826 (8.0M) [application/octet-stream]
Saving to: ‘WordPress.tar.gz’

100%[=========================================================================================================================>] 8,421,826   5.92MB/s   in 1.4s   

2016-09-06 16:54:49 (5.92 MB/s) - ‘WordPress.tar.gz’ saved [8421826/8421826]

If you did the Let’s Encrypt configuration,the following will display.

IMPORTANT NOTES:
 - If you lose your account credentials, you can recover through
   e-mails sent to specified email address.
 - Congratulations! Your certificate and chain have been saved at
   /etc/letsencrypt/live/specified domain/fullchain.pem.
   Your cert will expire on 2016-05-04. To obtain a new version of the
   certificate in the future, simply run Let's Encrypt again.
 - Your account credentials have been saved in your Let's Encrypt
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Let's
   Encrypt so making regular backups of this folder is ideal.
 - If you like Let's Encrypt, please consider supporting our work by:

    Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
    Donating to EFF:                    https://eff.org/donate-le

The provisioning is done if there is a message as following.「WordPress」 at the end of the message will be diffirent accoring to the provisioning type.

Provisioning of specified directory name completed. Access specified a domain and install WordPress!

Access to the specified hostname(FQDN)from the browser, and start site initialization.

When the provisioning type is LAMP, the following procedure will not be necessary. However, there is no file under DocumentRoot, configure the PHP application in another way.

For details on the provisioning command, refer to the KUSANAGI provisioning page.

WordPress installation
Concrete5 installation
Drupal8 installation