Git Product home page Git Product logo

arena's Introduction

Arena

This repository contains the tools necessary to run MegaMinerAI Tournaments.

GCP Project

Before running the Arena, you must have a Google Cloud Platform project set up. This should already be done, but if not, here are the steps:

  1. Create new project
  2. Enable APIs and Services on dashboard (scroll down, left side)
  3. Click +Enable APIs and Services at top
  4. Scroll down and click Compute Engine API
  5. Click ENABLE and wait
  6. Click Create Credentials at the top right
  7. Compute Engine API, Yes Manually create the firewall rules, so terraform doesn't destroy them. VPC→Firewall

New Rule name: allow-webservices network: default target tags: allow-webservices allow source filters: ip ranges: 0.0.0.0/0 protocols: tcp: 80, 443, 8080, 8000 icmp

Now, there is a default Compute Engine API service account.

  1. Create a key for it as a JSON. Save this in the secrets folder.
  2. Create main.tf, replacing the project name with your own.
  3. The resource google_compute_instance default should work.

Ansible Piece:

  1. Generate SSH key: ssh-keygen -t rsa -b 4096 -C "ansible"
  2. apt install xsel
  3. cat ~/.ssh/id_rsa.pub | xsel -ib
  4. Go to Compute Engine -> Metadata -> SSH keys -> Add new one and paste

Assuming you have pip installed... 5. pip install ansible 6.

INSTALL jq or not actually... Continued... I added the output variable to terraform. Now I am seeing how to osLogin I gave the service account the osloginadmin role https://cloud.google.com/compute/docs/instances/connecting-advanced#thirdpartytools Following that tutorial... Get the external IP

Okay so I believe that OSLogin will not work for us - it says you need an org account which idk if we wanna rely on. I have disabled OS Login and know that to make ssh keys work, you need to give them to the instances SO now main.tf does that, and we use our ansible ssh key to connect However, you also need to provide the public key to Compute Engine -> Metadata -> SSH Keys You SSH by doing ssh ansible@IP -i secrets/ansible ansible config has host key checking off because these vms are getting made and destroyed and so dont pass checks all the time.

arena's People

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.