CirrusWave Quickstart tutorials


Step1

  • Go to https://portal.azure.com
  • Create a new virutal machine
  • You will see the following screen
  • Enter a name for the machine
  • Enter ubuntu for username
  • click generate ssh key
  • Store the ssh key on your local computer in a safe place
  • click on 'Browse all public and private images'

Step2

  • Type cirruswave
  • Select CirrusWave Enterprise
  • Click on Review + Create

Step3

Connect to the CirrusWave machine

Step4

Prepare for SampleProject
  • cd /tmpreplace '/tmp' with the directory you want your project in
  • Open the ports 9999,4001-4010 for the machine ( Use the security groups to manage the right ports to be enabled for access)

Step5

Create two microservices and test
  • cirruswave -g -t newprojectgive a name for project if different from default value SampleProject
  • cd SampleProjectreplace 'SampleProject' with the name of the your project
  • cirruswave -g -t addnewservicegive a nmae for new service and the port if different from default
  • node newservice_index.jsreplace 'newservice' with the service name you chose in the previous step
  • Go to a browser and verify that you can access the url https://[ip of the machine]:9999/testreplace 9999 with the port you choose and also make sure the port is open in the security group
  • You will be able to test the routes that are created. The default routes simply echo the request url parameters and request body

Step6

Create container registries
  • Create one container regidtry for each environmentA project might have <projectname-dev>,<projectname-test>,<projectname-prod> conatiners if you have dev, test and prod as the environments you want to support
  • In Azure portal, go to the container and then select Access Keys
  • Enable Admin user and get the key acees info
Get contaier regsistry credentials
  • Go to the container and then select Access Keys
  • Enable Admin user and get the key aceess info
  • create a file cr.json in the SampleProject directory
  • Copy the loginserver url, username and password from the portal screen for container registry and update the corresponding values in cr.json
{
  "registryname": "registryname.azurecr.io",
  "username": "Username",
  "password": "password"
}

Step7

Create Azure storage account and storage containers
  • Create Storage account and storage containers for storing the configuration information for all the system services
  • Create one storage container for each environment for the project
  • Example : <projectname-dev>, <projectname-test>, <projectname-prod>
  • Make sure you get the credentials for the storage account as this will be used to configure the system services

Step8

Configure CirrusWave system services
  • cirruswave -g -t workflowConfigure the Workflow Service
  • cirruswave -g -t keymgrConfigure the Key Manager Service
  • cirruswave -g -t connector -z azblobConfigure the Connector Service as appropriate for your project. If the connections are different for each environment you will get the opportunity to set them up as well
  • Note you can create muktiple connections for different data soures like [ s3, azblob, mssql, pgsql, mysql, snowflake, azcosmosdb, n4jsvc, esservice, rabbitmq, wsoc, jira, sftp, ftp, email]

Step9

Create a default local working environment
  • Generate all the scripts necessary to launch your microservices locally
  • cirruswave -g -t runallscripts -j appserviceconfig.jsonGenerate all the scripts necessary to launch containers locally
  • bash launchscripts/runallservices.shRun the scripts locally
  • Note - ctrl+c will kill all of them

Step10

Containerize your microservices and test locally
  • cirruswave -g -t deploymentscripts -j appserviceconfig.jsonInitialize your deployment scripts for the project (this only needs to be done once)
  • bash launchscripts/buildcontainer.shCreate images, push them to container registry
  • bash launchscripts/runcontainerlocal.shpull images from container registry and run them locally

Step11

Create remote machines for each environment
  • mkdir ~/certscreate a directory to store the ssh credentials to access the remote machines
  • follow step1 and step2 to create virutal machines for each environment
  • Copy the .pem file for each virtual machine for each environment to ~/certs directory

Step12

Configure deployment environments e.g. typical project might contain dev, test, and prod environments. For each deployment environment, create scripts to build docker images and run docker containers.The following commands setup 'test' deployment environment
  • cirruswave -g -t createdeploymentmode -j appserviceconfig.json -m testcreates mode test and sets the mode ready for buildcontainer and runcontainer
  • cirruswave -g -t setmode -j appserviceconfig.json -m testset current mode to test
  • bash launchscripts/buildcontainer.sh –m testgenerate deploymentconfig, build docker images and push them to the container registry
  • bash launchscripts/runcontainerremote.sh –m testPull the docker images and deploy the containers to the test environment machine

Step1

  • Go to https://console.aws.com
  • Create a new ec2 instance
  • In the search box type cirruswave
  • Click on AWS Marketplace
  • Select CirrusWave-Enterprise and click on select
  • Click continue

Step2

  • Pick the instance size
  • Select the vpc, region, storage etc.
  • Either use an existing security group or create new security groups with ports 8080, 9090 which are the application microservices you will be creating, ports needed for the system services keymgr, connector and workflow 4003, 4007, and 4004
  • Click launch the instance
  • If you have a key already created, you can add that here
  • Or you can create new key
  • Make sure you down load the key and save it securely
  • This key is necessary for you to be access the machine using ssh

Step3

Connect to the CirrusWave machine
  • ssh -i [path to the pemfile] ubuntu@[ip of the machine]When the machine is ready, note the ip of the machine, path to the pem file where ssh key is stored

Step4

Prepare for SampleProject
  • cd /tmpreplace '/tmp' with the directory you want your project in
  • Open the ports 9999,4001-4010 for the machine ( Use the security groups to manage the right ports to be enabled for access)

Step5

Create two microservices and test
  • cirruswave -g -t newprojectgive a name for project if different from default value SampleProject
  • cd SampleProjectreplace 'SampleProject' with the name of the your project
  • cirruswave -g -t addnewservicegive a nmae for new service and the port if different from default
  • node newservice_index.jsreplace 'newservice' with the service name you chose in the previous step
  • Go to a browser and verify that you can access the url https://[ip of the machine]:9999/testreplace 9999 with the port you choose and also make sure the port is open in the security group
  • You will be able to test the routes that are created. The default routes simply echo the request url parameters and request body

Step6

Create AWS ECR repository
  • Go to ECR and create a repository
  • Pick a name for your repository and create repository
  • Copy the uri for later use in ecr.json
Get contaier regsistry credentials
  • install aws cli. Follow the instructions in this url https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
  • Go to Identity and Access Management (IAM) service
  • create a user in console.aws.amazon.com/iam called AdminProg (programmable user not console)
  • Add to Admin group
  • Create user
  • Go to credentials tab and create access key. Donwload the access and secret keys. (Keep these in a secure place)
  • run aws configure
  • AWS Access Key ID [None]: accesskey
  • AWS Secret Access Key [None]: secretkey
  • Default region name [None]: us-west-2
  • Default output format [None]: json
  • the instructions for doing this are in this url https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html
  • aws ecr get-login-password
  • update the ecr.json as shown below
{
"registryname":"repositoryuri",
"username":"AWS",
"password":"accestoken"
}

Step7

Create S3 account for storage
  • Create s3 account
  • Create a bucket
  • Make sure you get the credentials for the s3 account as this will be used to configure the system services

Step8

Configure CirrusWave system services
  • cirruswave -g -t workflowConfigure the Workflow Service
  • cirruswave -g -t keymgrConfigure the Key Manager Service
  • cirruswave -g -t connector -z azblobConfigure the Connector Service as appropriate for your project. If the connections are different for each environment you will get the opportunity to set them up as well
  • Note you can create muktiple connections for different data soures like [ s3, azblob, mssql, pgsql, mysql, snowflake, azcosmosdb, n4jsvc, esservice, rabbitmq, wsoc, jira, sftp, ftp, email]

Step9

Create a default local working environment
  • Generate all the scripts necessary to launch your microservices locally
  • cirruswave -g -t runallscripts -j appserviceconfig.jsonGenerate all the scripts necessary to launch containers locally
  • bash launchscripts/runallservices.shRun the scripts locally
  • Note - ctrl+c will kill all of them

Step10

Containerize your microservices and test locally
  • cirruswave -g -t deploymentscripts -j appserviceconfig.jsonInitialize your deployment scripts for the project (this only needs to be done once)
  • bash launchscripts/buildcontainer.shCreate images, push them to container registry
  • bash launchscripts/runcontainerlocal.shpull images from container registry and run them locally

Step11

Create remote machines for each environment
  • mkdir ~/certscreate a directory to store the ssh credentials to access the remote machines
  • follow step1 and step2 to create virutal machines for each environment
  • Copy the .pem file for each virtual machine for each environment to ~/certs directory

Step12

Configure deployment environments e.g. typical project might contain dev, test, and prod environments. For each deployment environment, create scripts to build docker images and run docker containers.The following commands setup 'test' deployment environment
  • cirruswave -g -t createdeploymentmode -j appserviceconfig.json -m testcreates mode test and sets the mode ready for buildcontainer and runcontainer
  • cirruswave -g -t setmode -j appserviceconfig.json -m testset current mode to test
  • bash launchscripts/buildcontainer.sh –m testgenerate deploymentconfig, build docker images and push them to the container registry
  • bash launchscripts/runcontainerremote.sh –m testPull the docker images and deploy the containers to the test environment machine