Coder Social home page Coder Social logo

mars's Introduction

Mars

Luther Systems infrastructure management tool.

Installation

brew install luthersystems/repo/mars

Additional requirements for ansible

If running ansible locally, you will also need ssh agent access through mars. This is currently accomplished using the pinata-ssh-forward tool from uber-common/docker-ssh-forward. Follow the installation instructions there to install the tool and make sure pinata-ssh-forward is in your path.

In addition, make sure ssh-agent has your ssh key loaded:

ssh-add -l

If ssh-add doesn't print anything, it doesn't have you key. Run ssh-add without arguments or point it to the appropriate key file in special cases.

Terraform

If you need to run a raw terraform command using the terraform binary installed in the container you may run mars terraform but without care python will intercept options/flags intended for terraform. Often you will have to use the special argument -- to tell python not to try and parse the flags meant for terraform.

mars dev terraform -- providers --help

Setting up managed repositories

Place a .mars-version file at the root of the mars managed infrastructure repository to pin the version of mars for the repository. For example, to set the mars version to v0.81.1, run the following from the target repo.

echo v0.82.1 > $(git rev-parse --show-toplevel)/.mars-version

Ensure all terraform projects have a .terraform-version file specifying which terraform version to use. See tfenv for more details.

echo 1.7.3 > .terraform-version

Building

To build the container, run:

make

mars's People

Contributors

jeremy-asher avatar sam-at-luther avatar bmatsuo-at-luthersystems avatar andrei-at-luther avatar bmatsuo avatar dependabot[bot] avatar

Watchers

 avatar

mars's Issues

Acre - fix failed mars ansible run (bastion.yaml)

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (403) when calling the HeadBucket operation: Forbidden      
fatal: [ec2-13-40-7-108.eu-west-2.compute.amazonaws.com]: FAILED! => changed=false                                                                                                                              
  boto3_version: 1.20.50                                                                                                                                                                                        
  botocore_version: 1.23.50                                                                                                                                                                                     
  error:                                                                                                                                                                                                        
    code: '403'                                                                                                                                                                                                 
    message: Forbidden                                                                                                                                                                                          
  msg: 'Failed while looking up bucket (during bucket_check) luther-common-ln-common-static-s3-b5oc.: An error occurred (403) when calling the HeadBucket operation: Forbidden'                                 
  response_metadata:                                                                                                                                                                                            
    host_id: pW2eCYeviiL87TBxMBnClIun+i3BBhPILiLPQl9Ag3cQE1sg2knICMnTs6ILs3SqKPqVFpvdpOE=                                                                                                                       
    http_headers:                                                                                                                                                                                               
      content-type: application/xml                                                                                                                                                                             
      date: Fri, 05 Jan 2024 18:39:56 GMT                                                                                                                                                                       
      server: AmazonS3                                                                                                                                                                                          
      x-amz-bucket-region: eu-west-2                                                                                                                                                                            
      x-amz-id-2: pW2eCYeviiL87TBxMBnClIun+i3BBhPILiLPQl9Ag3cQE1sg2knICMnTs6ILs3SqKPqVFpvdpOE=                                                                                                                  
      x-amz-request-id: D07A9Q0S26B8DGTG                                                                                                                                                                        
    http_status_code: 403                                                                                                                                                                                       
    request_id: D07A9Q0S26B8DGTG                                                                                                                                                                                
    retry_attempts: 0                                                                                                                                                                                           
                                   
mars integration ansible-playbook -vvv bastion.yaml

Fix commit-chaincode peer discover

Peer discovery in commit-chaincode.sh doesn't work when we have pre-generated certs for peers that aren't running:

org_peer() {
    local org_domain="$1"
    local root=/etc/hyperledger/fabric/tls/all-cas
    pod_exec "$pod" sh -c "ls '${root}/${org_domain}/peers/' | shuf | head -n 1 | xargs basename"
}

We need to adapt this to discover the pod differently

[Bug] Ansible anchor-peers.sh silently fails

The script does this, which looks wrong

pod_exec "$pod" \
    peer channel fetch oldest "$CHANNELBLOCK" -c "$CHANNEL"

The command should look like peer channel fetch config ...

That issues is related to several bugs mentioned later in the script

# FIXME:  This jq query does not correctly detect anchor peers for $MSP. It
# only works directly after anchor peers have been added.

# FIXME: Because we can't correctly detect above whether the anchor peers have
# already been added the `channel update` transaction may fail.

The bug should not be hard to fix. We also have scripts now which help retrieving the channel config as json.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.