fame-bootstrap

command module
v0.0.0-...-cfc79c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

Fame bootstrap

Command line utility to bootstrap fame entities built with in GO with viper and cobra

Configuration file

Location

A configuration file is required in order to run this application. The default path for the configuration file is $HOME/.famebootstrap.yaml You can also pass an absolute path to your custom configuration file using the flag config

Content

A default configuration file can be found in this repo at .famebootstrap.yaml. The baseUrl has to be setup for all three environments.

How to use

Assuming you have access to the executable binary named famebootstrap, the list of available commands can be found:

Help

You can get a list of all available commands

$ famebootstrap help 
$ famebootstrap bootstrap --help 

Bootstrap

You can bootstrap a entire fame entity or a specific resource belonging to a fame entity

$ famebootstrap bootstrap [entityName] [resourceId]
  • The entityName argument has to be the name of a valid entity from FAME.
  • If the entityName argument is not passed as input, you will be required to enter an entity name during the program execution.
  • The entityName argument has to be specified in order to use the resourceId argument
  • If both the entityName and the resourceId arguments are specified, only that specific resourceId will be bootstrapped

The following flags can be passed as input:

  • -q : The destination queue for the messages you are bootstrapping. If not specified, you will be prompted to enter one during the execution
  • -e : The environment to be used for the bootstrap. If not specified, you will be prompted to enter one during the execution
  • -u : A custom base url can be supplied here and it will override the base url provided in the configuration file
 $ famebootstrap bootstrap
 $ famebootstrap bootstrap match
 $ famebootstrap bootstrap stadium
 $ famebootstrap bootstrap match -e=GOLD -q=fsp
Status

You can get the status of a running bootstrap The argument commandId can be retrieved from the output of the bootstrap command

$ famebootstrap status {commandId}

How to build

$ go get
$ go fmt path_to_source_code\fame-bootstrap
  • Windows:
$ env GOOS=windows GOARCH=amd64 go build -o build/famebootstrap.exe
  • Linux:
$ env GOOS=linux GOARCH=amd64 go build -o build/famebootstrap

Once the executable binary has been created, you can run it directly from the command line as explained in how to use section

how to run

The program can be run directly from the code using:

$ go run main.go {name_of_the_command} [args] [flags]

e.g. $ go run main.go bootstrap match -q=fsp -e=PROD

Documentation

Overview

Copyright © 2020 NAME HERE kamga.stephane@gmail.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL