Skip to content

Tyrion server - central component of Byzance cloud flow.

License

Notifications You must be signed in to change notification settings

zarubto4/tyrion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tyrion

Back-end server for Becki, managing Code, Blocko and Grid. Server is used for interaction with PostgreSQL DB.

Server also keeps user information and does the billing.

This server knows all wanted states that Hardware or Instances should be in and gives directives if it is needed.

Deployment

  • kubectl save configuration file for cluster in /.kube/config. Configuration file expires every 7 days so you need to update it manually.
  • run kubectl set image deployment/tyrion tyrion=byzancedocker/tyrion:release-{version_number} substituting version number with tag you want to roll out e.g. kubectl set image deployment/tyrion tyrion=byzancedocker/tyrion:release-2.3.2
  • release-{version_number} can be substituted with any tag in dockerhub repo
  • if new tag is same as new (eg its set to tyrion:latest, you push new code to master without version tag and try to set image to latest again) nothing will happen - you will have to delete deployment manually and roll out a new one

DEV mode

Prerequisites

Setup

  • Install Java and JCE - Unlimited Strength policy files (only replace files in your_java/lib/security folder)
  • (You might have to add location of java.exe and javac.exe to JAVA_HOME or PATH variable)
  • Install PostgreSQL and create password "admin" for superuser "postgres" and create DB "byzance"
  • In root of the application run terminal command "activator run" (might have to add path of your activator/bin to PATH variable)

Tips

  • Command "activator clean" removes the compiled application. (can be helpful if the application is somehow badly compiled)
  • For building the production version, use command "activator dist"

DOCU on GIT DOCU

https://github.com/ByzanceIoT/tyrion/wiki

// Create DIR

mkdir mongodb-charts
cd mongodb-charts

// Stažení souboru

wget "https://webassets.mongodb.com/com-download-center/charts/charts-docker-compose-v0.10.0.yml"   

// Enable docker file

sudo docker swarm init    

docker pull quay.io/mongodb/charts:v0.10.0

docker run --rm quay.io/mongodb/charts:v0.10.0 charts-cli test-connection mongodb+srv://chart:PracujVic@byzancecluster-4qtus.gcp.mongodb.net/admin

echo "mongodb+srv://chart:PracujVic@byzancecluster-4qtus.gcp.mongodb.net/admin" | docker secret create charts-mongodb-uri -

Mongo Chats loig: docker run --rm quay.io/mongodb/charts:v0.10.0 charts-cli test-connection mongodb+srv://tyrion:UGoYBIZUwUhvth0q@byzancecluster-4qtus.gcp.mongodb.net/admin

##echo "docker run --rm quay.io/mongodb/charts:v0.10.0 charts-cli test-connection mongodb+srv://tyrion:UGoYBIZUwUhvth0q@byzancecluster-4qtus.gcp.mongodb.net/admin" | docker secret create charts-mongodb-uri -

sudo docker stack deploy -c charts-docker-compose-v0.10.0.yml mongodb-charts

sudo docker service ls

sudo docker exec -it \
  $(docker container ls --filter name=_charts -q) \
  charts-cli add-user --first-name "Tomas" --last-name "Zaruba" \
  --email "tomas.zaruba@byzance.cz" --password "PracujVic" \
  --role "UserAdmin"
  
  
  docker exec -it \
    $(docker container ls --filter name=_charts -q) \
    charts-cli add-user --first-name "<First>" --last-name "<Last>" \
    --email "tomas.zaruba@byzance.cz" --password "PracujVic" \
    --role "UserAdmin"

// DB name

ac42202a-2363-414b-9eef-9b87dd304b2d

// Connection to charts success mongodb+srv://Franta:PracujVic@byzancecluster-4qtus.gcp.mongodb.net/ac42202a-2363-414b-9eef-9b87dd304b2d

// Import Success mongoimport --host byzancecluster-shard-00-00-4qtus.gcp.mongodb.net:27017,byzancecluster-shard-00-01-4qtus.gcp.mongodb.net:27017,byzancecluster-shard-00-02-4qtus.gcp.mongodb.net:27017 --ssl -u tyrion -p UGoYBIZUwUhvth0q --authenticationDatabase admin
--db ac42202a-2363-414b-9eef-9b87dd304b2d --collection movieDetails
--drop --file movieDetails.json