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

Enter the following:

# kusanagi provision [Any profile name]

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.

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

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

2. Selection of provision type

You can use option to choose the type of provision.

  • If the option of --WordPress is specified, then WordPress provisioned
  • If the option of --concrete5 is specified, then concrete5 provisioned
  • If the option of --drupal8 is specified ,then --drupal8 provisioned
  • If the option of --lamp is specified, then the configuration for using LAMP(Linux+NGINX+MySQL+PHP) or LEMP(Linux+NGINX+MySQL+PHP) provisioned

If none of the options above was specified, wordpress will be provisioned

3. WordPress language selection

When wordpress was provisioned,you should choose the language at the time of wordpress installation,other circumstances will be ignored.
It will be possible for choosing the language at the time of wordpress installation by using option --wplang en_US, you can use the option --wplang ja to install the Japanese type of wordpress.
If --wplang was not specified,the message will be as following and there will be a dialogue for you to choose en_US or ja.

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 following.

You choose: ja

4. Selection of WooCommerce plugin

At the time of WordPress provisioning,you can select the addtional installation of WooCommerce.other times but WordPress provisioning will be ignored .
Woocommerce plugin and StoreFront theme will be installed at the same time by using the option --WooCommerce or --woo while the wordpress is installing.
If the option --wplang ja was selected at the same time,the Japanese pack of WooCommerce ,WooCommerce for Japan plugin,GMO payment plugin will be installed at the same time.

5. Set host name

Using the created profile to specify the host name(FQDN).
Specify the option --fqdn hostname,hostname,the configuration file of web server and /etc/hosts file will be configured.
If you do not specify the option --fqdn,the message will be as following and there will be a dialogue for you to type in the host name.

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

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

The message will be as following and retype in the host name to confirm.

Re-type hostname(fqdn) for your website.

6. Let’s Encrypt configuration

Issue the SSL certificate for the host name you specified at step 5.

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

Let’s Encrypt will issue SSL certificate by specifying option --email mail address.
Let’s Encrypt will not issue SSL certificate if you use option --noemail
If you do not specify --email or --noemail,the message will be as following and there will be a dialogue for you to specify an email address.

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,just 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.

7. Set database name

To configure the database name.
when the option --dbname database name is specified,you will create a new MySQL database with the name you had specified.
If you do not specify the option --dbname,the message will be as following and there will be a dialogue for you to enter a database name.

Enter the name of your database.

The message will be like this after you type in your database name,retype in your database name.

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.

8. Set database user name

To configure a user name for the database you created at step 7.
By specifying the option --dbuser,you can configure a user name for accessing to the database created at step 6.
If you do not specify the option --dbuser,the message will be as following and there will be a dialogue for you to enter a user name.

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

Type in user name and the message will be as following and retype in the user name for confirming.

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

9. Set database user password

To configure a user password for the database you created.
By specifying the option --dbpass,you can configure a user password for accessing to the database created at step 7.
If you do not specify the option --dbpass,the message will be as following and there will be a dialogue for you to enter a user password.

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'.

10. Complete provisioning

The following message will display once step 9 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/aws03.
--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 domain and install WordPress!

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

When the provisioning type is LAMP,the following procedure will not be necessary.But there is no file under DocumentRoot,Configure the PHP application in another way.
WordPress installation
Concrete5 installation
Drupal8 installation