Quick Start Demos - wintersys-projects/adt-build-machine-scripts GitHub Wiki

QUICK START DEMOS PRE-REQUISITE STEPS (REQUIRED FOR ALL DEMOS)

The purpose of these quick start demos is to show you that with just some parameters you can achieve a lot using the Agile Deployment Toolkit with the possibility of going much deeper into it if you choose to.

For more information please see the spec and quickspec

OBJECTIVE:

After steps 1-8 below, you should have a text file on your laptop with content similar to the following sample/example values:

Build Machine User: "nuocial-deployer"
Build Machine Password: "gdjkbcijbue2hhfdy3e8"
Build Machine SSH PORT: "1035"
Laptop IP: 111.111.111.111
Linode account username : nuocialdeployer
Linode account email address : [email protected]
Laptop public key : ssh-rsa AAAAB3MbsHaC1Jc2EAA......8X8TGp19n root@penguin
Object Storage access key : PJX1HOLT157FQ9WCQ52K
Object Storage secret key: malXD6aIPRAlxR2zU3IrpDDFWbNSLoGKLA6T1JeP
Personal Access Token : 23c8b26866a9fd81634a83182da5e1193bcc73d731d9224732159a8e31989d29
Live Domain Name: demo.nuocial.org.uk
Core Website Name: nuocial


  1. Open up an empty text document on your laptop and make up a username, password and ssh port for your prospective build machine. Find the ip address of your laptop by going to whats my ip and enter the ip address of your laptop into your empty text document, for example,
  "Username: nuocial-deployer"
  "Password: gdjkbcijbue2hhfdy3e8"
  "Port: 1035"
  "Laptop IP: 111.111.111.111"  
  1. Setup an account with Linode Linode - make a note in your text document that you opened in 1 of the username of your linode account for example,
   "Linode account username : nuocialdeployer"  

and the email address you used to register your linode account under for example,

   "Linode account email address : [email protected]"
  1. Setup a pair of SSH Keys on your laptop if you haven't already - make a note in your text document that you opened in 1 of the full public key part of the key pair you just generated for example,
   "Laptop public key : ssh-rsa AAAAB3MbsHaC1Jc2EAA......8X8TGp19n root@penguin"  
  1. Setup Object Storage for your account if its not already setup according to Object Storage Setup - make a note in your text document of the access key and the secret key for your object storage for example,
   "Object Storage access key : PJX1HOLT157FQ9WCQ52K "  

and

   "Object Storage secret key: malXD6aIPRAlxR2zU3IrpDDFWbNSLoGKLA6T1JeP"  
  1. Generate a personal access token with all read and write permissions granted according to Generate Personal Access Token - make a note of your PAT in your text document for example,
   "Linode Personal Access Token : 23c8b26866a9fd81634a83182da5e1193bcc73d731d9224732159a8e31989d29"  
  1. Purchase a domain if you don't have one and change the nameservers of the domain to "ns1.linode.com, ns2.linode.com, ns3.linode.com, ns4.linode.com and ns5.linode.com" with your domain registrar (if you don't know how to purchase a domain and change its active nameservers, then, this toolkit probably isn't suitable for you).

  2. You now need to make a note of the domain name you are using to deploy to for example, if I have just purchased as set up a domain "nuocial.org.uk" in step 6, my intended domain name for my final website to be available at might be "demo.nuocial.org.uk" so make a note in your text file

   "Live Domain Name: demo.nuocial.org.uk"

You now need to update your linode DNS system with your new domain name. Click on "Domains" from the Linode GUI and add your domain name as a "Primary Domain" to the Linode DNS system in my case the primary domain will be "nuocial.org.uk"

  1. You need to make a note of the "core website name" which is "nuocial" if your domain name is "demo.nuocial.org.uk" and "testwebsite" if your domain name is "demo.testwebsite.uk"

You should now have a text file on your laptop that looks similar to my test/sample one listed under "objective" above.

What you now need to do to have your pre-requisite steps completed is enter the values that you have in your text file into the "AgileDeploymentToolkitDemo" Stackscript. To deploy the demo application, follow these steps

  1. Go to "Stackscripts" from the GUI system of your Linode Account and find the public Stackscript "AgileDeploymentToolkitDemo" and click "Deploy Linode"

  2. You will then see a list of configurable text-fields that you are going to selectively enter the data from the text file you now have on your laptop. Each text-field has a label and so to configure the Stackscript, find the label as I mention it below and enter the corresponding value from your text file into that text-field

  3. Label: "SSH Public Key from your laptop (required)" - value from YOUR text file which in my case is "AAAAB3MbsHaC1Jc2EAA......8X8TGp19n root@penguin"

  4. Label: "IP address of your laptop (required)" - value from YOUR text file which in my case is "111.111.111.111"

  5. Label: "The username of your Linode account (required)" - example value which in my case is "nuocialdeployer"

  6. Label: "The email address of your DNS provider (required)" - example value which in my case is "[email protected]"

  7. Label: "The S3 access key for your linode object storage (required)" - example value which in my case is "PJX1HOLT157FQ9WCQ52K"

  8. Label: "The S3 secret key for your linode object storage (required)" - example value which in my case is "malXD6aIPRAlxR2zU3IrpDDFWbNSLoGKLA6T1JeP"

  9. Label: "Your linode personal access token (which must have all rights granted) (required)" - example value which in my case is "23c8b26866a9fd81634a83182da5e1193bcc73d731d9224732159a8e31989d29"

  10. Label: "The domain name of your website which must be registered with your DNS provide" - example value which in my case is "demo.nuocial.org.uk"

  11. Label: "Website name if url is www.nuocial.org.uk this is nuocial (required)" - example value which in my case is "nuocial"


For every demo below you need to run through all the pre-requisite steps mentioned above. For each demo, before you click "Create Linode" at the bottom of the page make sure that you are creating a linode in the correct region (nl-ams), that the Linode has a root password set and that private ip addresses are enabled. The rest of the settings for your linode are left to your discretion. Once you click "Create Linode", the build will deploy which will take some minutes.

Once the build is completed you can:

You can ssh onto the build machine once it has started up with

 ssh -p 1035 nuocial-deployer@<build-machine-ip>

then do a

 sudo su <password as per step 4 above>
 cd adt-build-machine-scripts/logs
 tail -f buildout - to see the error stream and how the build is progressing

Note 1:

Be aware that a new SSL certificate is issued each time you run this Stackscript which means that if you do multiple deployments you will run into "rate limiting" problems. If you need to perform multiple build cycles for a particular domain you are best off using the expedited method as described here. You can also set SSL_LIVE_CERT to 0 to use a staging certificate which doesn't have such restrictive rate limiting as a production certificate but it might give you a browser security warning when you access your website.

Note 2:

Once your machines are built the UFW firewall will be installed on your build machine (the machine that was built using the StackScript) but you can tighten what the UFW configuration provides by default by creating a firewall called "adt-build-machine" through your linode gui adding the build machine to it and creating a rule to only allow access from your "LAPTOP IP" mentioned above to the "Build Machine SSH PORT" mentioned above. This will tighten up the security of your build machine to only allow SSH access from your laptop and to the specific port you have configured SSH to use through your selection. All the other ports on your build machine will be firewalled off making it more difficult to compromise because it has sensitive access keys and secret keys on it, for example. This will give you two layers of tightly configured fire walling for your build machine the native firewall which you optionally set up manually and the ufw firewalling that is set up automatically.

Note 3:

These are only demos and use naked DNS configurations (meaning no proxying through a service to facilitate a WAF and so on). If you want to get more serious you very likely will want to configure Cloudflare or modify the toolkit to support another service of your choice.

Note 4:

Once the build has completed you might have to give the linode DNS system a few minutes to refresh with the IP address that have been added for this build.


Demo 1 (Sample Community Builder Joomla application)

Community Builder

  1. Follow the all the pre-requisite steps above
  2. You can play with additional settings such as machine size and so on, but, the demo application should install without needing any additional steps above and beyond what is outlined in the pre-requisite steps.
  3. Once the application is installed, the username is "webmaster" and the password is "mnbcxz098321QQZZ". There are also test users and their usernames and passwords are: "testuser1" and "mnbcxz098321QQZZ" and "testuser2" "mnbcxz098321QQZZ"

Demo 2 (Sample Joomla Application)

This is just a sample joomla install with some sample data installed

  1. Follow the all the pre-requisite steps above

In addition to the pre-requisite steps above alter the following settings in your Stackscript:

 "The Display name for your website e.g. My Demo Website" to "My Joomla Demo"  
 "BASELINE DB REPOSITORY" to "joomlademo-db-baseline" 
 "APPLICATION BASELINE SOURCECODE REPOSITORY" to "joomlademo-webroot-sourcecode-baseline"  

Demo 3 (Sample Joomla Astroid Application)

Astroid Framework

This is just a sample joomla install with the astroid framework installed

  1. Follow the all the pre-requisite steps above

In addition to the pre-requisite steps above alter the following settings in your Stackscript:

 "The Display name for your website e.g. My Demo Website" to "My Astroid Demo"   
 "BASELINE DB REPOSITORY" to "astroid-db-baseline" 
 "APPLICATION BASELINE SOURCECODE REPOSITORY" to "astroid-webroot-sourcecode-baseline"   

Once the application is installed, the username is "admin" and the password is "mnbcxz098321QQZZ"


Demo 4 (Sample Joomla Kunena Application)

Kunena

This is just a sample joomla install with the kunena forum installed

  1. Follow the all the pre-requisite steps above

In addition to the pre-requisite steps above alter the following settings in your Stackscript:

"The Display name for your website e.g. My Demo Website" to "My Kunena Demo"   
"BASELINE DB REPOSITORY" to "kunena-db-baseline" 
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "kunena-webroot-sourcecode-baseline"   

Once the application is installed, the username is "webmaster" and the password is "mnbcxz098321QQZZ"


Demo 5 (Sample Joomlart Free Templates Example Applications)

  1. Follow the all the pre-requisite steps above

  2. In addition to the pre-requisite steps above alter the following settings in your Stackscript:

"The Display name for your website e.g. My Demo Website" to "My Purity Template Demo"  

Demo JA Template One

Joomlart Purity This is just a sample joomla install with the purity template installed

"BASELINE DB REPOSITORY" to "purity-db-baseline" 
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "purity-webroot-sourcecode-baseline"   

OR

Demo JA Template Two

Joomlart Stark This is just a sample joomla install with the stark template installed

"BASELINE DB REPOSITORY" to "stark-db-baseline" 
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "stark-webroot-sourcecode-baseline"  

OR

Demo JA Template Three

Joomlart Campaign This is just a sample joomla install with the stark template installed

"BASELINE DB REPOSITORY" to "campaign-db-baseline" 
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "campaign-webroot-sourcecode-baseline"    

Once the application is installed, the username is "webmaster" and the password is "mnbcxz098321QQZZ"


Demo 6 (Sample Peepso Wordpress Application)

Peepso

This is just a sample Peepso Wordpress demo

  1. Follow the all the pre-requisite steps above

In addition to the pre-requisite steps above alter the following settings in your Stackscript:

"The Display name for your website e.g. My Demo Website" to "My Peepso Demo"  
"APPLICATION" to "wordpress"  
"APPLICATION IDENTIFIER" to "2"  
"BASELINE DB REPOSITORY" to "peepso-db-baseline" 
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "peepso-webroot-sourcecode-baseline"  

Once the application is installed, the username is "webmaster" and the password is "mnbcxz098321QQZZ"


Demo 7 (Sample Wordpress Application)

This is just a sample wordpress template with some sample data installed which will show you how you can get a pre-built site up and running with this toolkit

  1. Follow the all the pre-requisite steps above

In addition to the pre-requisite steps above alter the following settings in your Stackscript:

"The Display name for your website e.g. My Demo Website" to "My Wordpress Demo"  
"APPLICATION" to "wordpress"  
"APPLICATION IDENTIFIER" to "2"  
"BASELINE DB REPOSITORY" to "wordpressdemo-db-baseline" 
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "wordpressdemo-webroot-sourcecode-baseline"  

Demo 8 (Sample Drupal Application)

Opensocial

  1. Follow the all the pre-requisite steps above

In addition to the pre-requisite steps above alter the following settings in your Stackscript:

"The Display name for your website e.g. My Demo Website" to "My Opensocial Demo"  
"APPLICATION" to "drupal"  
"APPLICATION IDENTIFIER" to "3"  
"BASELINE DB REPOSITORY" to "opensocial-db-baseline" (with sample data) or "opensocialvanilla-db-baseline" (without sample data)  
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "opensocial-webroot-sourcecode-baseline" (with sample data) or "opensocialvanilla-webroot-sourcecode-baseline" (without sample data)  

Once the application is installed, the username is "webmaster" and the password is "mnbcxz098321QQZZ"


Demo 9 (Virgin Joomla install)

  1. Follow the all the pre-requisite steps above
  2. To install a virgin joomla deployment change the following additional values in your Stackscript
"The number (1, 2 or 3) of the template you are using" to "1"  
"The Display name for your website e.g. My Demo Website" to "My Joomla Demo"  
"APPLICATION" to "joomla"  
"APPLICATION IDENTIFIER" to "1"  
"JOOMLA VERSION" and set it to the latest version of Joomla for example, "5.0.1"  
"BUILD CHOICE" to "0"  
"BUILD ARCHIVE CHOICE" to "virgin"  
"BASELINE DB REPOSITORY" to "VIRGIN"  
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "JOOMLA:5.0.1"  

You can then deploy your Linode using your Stackscript and wait for your Joomla install will come online

In the browser you will then need to fill in all the installation values which you can find in the build log on your build machine

 /bin/cat ${BUILD_HOME}/logs/b*err*. 

You will see a message asking you to remove _J* file from the installation folder. Once you see this message wait until your system clock on your laptop cycles to the next minute and the system will have deleted it for you. You can then scroll down and click "Install Joomla"


Demo 10 (Virgin Wordpress install)

  1. Follow the all the pre-requisite steps above
  2. To install a virgin wordpress deployment change the following additional values in your Stackscript
"The number (1, 2 or 3) of the template you are using" to "1"  
"The Display name for your website e.g. My Demo Website" to "My Wordpress Demo"  
"APPLICATION" to "wordpress"  
"APPLICATION IDENTIFIER" to "2"  
"BUILD CHOICE" to "0"  
"BUILD ARCHIVE CHOICE" to "virgin"  
"BASELINE DB REPOSITORY" to "VIRGIN"  
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "WORDPRESS"    

You can then deploy your Linode using your Stackscript and wait for your Wordpress install will come online


Demo 11 (Virgin Drupal install)

  1. Follow the all the pre-requisite steps above
  2. To install a virgin drupal deployment change the following additional values in your Stackscript
"The number (1, 2 or 3) of the template you are using" to "1"  
"The Display name for your website e.g. My Demo Website" to "My Drupal Demo"  
"APPLICATION IDENTIFIER" to "3"  
"DRUPAL VERSION" set it to the latest version of drupal for example, "10.0.10" 
"BUILD CHOICE" to "0"  
"BUILD ARCHIVE CHOICE" to "virgin"   
"BASELINE DB REPOSITORY" to "VIRGIN"  
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "DRUPAL:10.0.10"   

You can then deploy your Linode using your Stackscript and wait for your Drupal install will come online

Note:

You can install a vanilla copy of OpenSocial instead of a version of drupal by making the following adjustments to the 8 steps outlined above for demo 9

Change the value

"The Display name for your website e.g. My Demo Website" to "My Opensocial Demo"  
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "DRUPAL:social"  

IMPORTANT

and at the time of writing, PHP8.1 is the supported version for opensocial do you need to also set

"PHP VERSION" to "8.1"

Caveat for Opensocial - I have no knowledge of drupal and when I installed opensocial it had problems with the images not displaying if anyone with a deeper knowledge of drupal that makes one of these deployments knows what is happening that would be very cool.


Demo 12 (Virgin Moodle install)

  1. Follow the all the pre-requisite steps above
  2. To install a virgin moodle deployment change the following additional values in your Stackscript
"The number (1, 2 or 3) of the template you are using" to "1"  
"The Display name for your website e.g. My Demo Website" to "My Moodle Demo"  
"APPLICATION" to "moodle"  
"APPLICATION IDENTIFIER" to "4"  
"BUILD CHOICE" to "0"  
"BUILD ARCHIVE CHOICE" to "virgin"  
"BASELINE DB REPOSITORY" to "VIRGIN"  
"APPLICATION BASELINE SOURCECODE REPOSITORY" to "MOODLE"   

You can then deploy your Linode using your Stackscript and wait for your Moodle install will come online
Once moodle is installed, I go to demo.nuocial.org.uk/moodle and you should do the same for your domain.

The default username and password for your moodle installation are:

username: admin123
password: changeme17832

Both the username and password should be changed immediately your moodle instantiation is online