Harbormaster Project Commands

Project Generation

harbormaster project_generate [options]

Generates a project using the directives of a YAML file.

Synopsis

The easiest way to generate an application and all its required files is to do so in a single YAML file.

For each supported tech stack, view sample “project-as-code” YAML files here.

Example Project-as-Code YAML file:

project:
    techstack:
       name:                       Angular7MongoDB  
    model:
       name:		           myModel
#
# DevOps Project Creation Options
#    	
    options:

#            
# Application parameters
#            
    
        application:
            name:                  angular7demo
            description:           Demo Angular7 application generated by Harbormaster
            author:                Dev Team
            email:                 xxxx.xxxxxxxxx@xxxxxxxx.com
            application logo URL:  ./img/turnstone.biologics.png
            company name:          Turnstone Biologics
            version:               0.0.1
            
            
#            
# Docker parameters
#            
        docker:
            userName:     xxxxxxxxxxxx
            password:     xxxxxxxxxxxx
            orgName:      theharbormaster
            repo:         angular7demo
            tag:          latest
             
             
#            
# CI/CD parameters
#            
        cicd:
            platform:  codeship    # options: codeship, circleci, 
                                   # jenkins, azure, aws, gitlab, 
                                   # bitbucket, buddy, semaphore
            AES key:   XKyy2IDcSptIIvMY8KLMVMcxVs+ZK6AyNu1B4Wu1DPY=


#
# Git repository parameters
#
        git:            
            name:        git_test_Angular7MongoDB
            username:    xxxxxxxxxxxxxx
            password:    xxxxxxxxxxxxxx
            repository:  AngularRunningOnAWS
            tag:         latest
            host:        bitbucket.org            

#
# HashiCorp Terraform parameters
#
        terraform:
            inUse:             true	
            provider:          aws        # options: aws, google, azure, nutanix
            region:            us-east-1  # options: any cloud provider region
            ssh-fingerprint:   50:36:21:3f:3e:fd:de:fc:2f:1f:17:a6:09:6d:1b:dd
            
            
#
# AWS parameters
#
        aws:
            key-pair-name:     my-public-key
            vpc:               vpc-c422e2a0
            ec2-instance-type: t2.medium    # options: any AWS instance type
            access-key:        ASSIGN__ON_CICD_PLATFORM_AS_ENV_VARS
            secret-key:        ASSIGN__ON_CICD_PLATFORM_AS_ENV_VARS
            
#
# Kubernetes parameters: If not in use, and Terraform
#                        is in use, physical infrastructure
#                        will be provisioned on the provider
#
        kubernetes:
            inUse:              true
            host:               https://xxx.xxx.xxx.xxx
            project:            my-project-name
            region:             us-central1-a      # options: any provider region
            hostTarget:         google             # option: google, aws, azure
            username:           admin
            password:           xxxxxxxxxxxx
            exposeAsService:    true
            serviceType:        LoadBalancer      
            useSessionAffinity: true

#            
# Artifact repository for build dependencies and binaries            
#
        artifact-repo:
            inUse:              false
            type:		jfrog                  # options: nexus, jfrog
            userName            xxxxxxxxxxxxxxxxx
            password:           xxxxxxxxxxxxxxxxxx
            email:              dev@harbormaster.ai
            serverUrl
:          http://127.0.0.1/repository/
            buildArtifactRepo:
            buildArtifactIntegration:
            dockerArtifactRepo:
            dockerArtifactIntegration:
            dockerRegistry:

#            
#  MongoDB parameters            
#
        mongodb: 
            server address:          localhost:27017
            database name:           angular7demo
            search size:             10
            default collection name: default_collection
            auto-increment id name:  _id
            auto-increment seq name: seq
            mongooseHost:            http://localhost
            mongoosePort:            4000        
  

To generate a project using the directives of a “Project-as-Code YAML file:

harbormaster project_generate ./samples/yamls/generate-django-project.yml

To generate a project overriding certain directives of an app generation YAML file:

harbormaster project_generate ./samples/yamls/generate-django-project.yml 
   -g ./samples/git/test.git.yml 
   -o ./samples/options/remote/django-project-options.json 
   --modelIdentifier ./samples/yamls/model-publish.yml

using args:

  • -g, --gitFile : Git settings in YAML file, overrides project->options->git params
  • -o, --optionsFile : App options in JSON file, overrides project->options params
  • -m, --modelIdentifier : Either a Model YAML directive file or the ID of a previously published model, overrides app.model.identifier param