GithubHelp home page GithubHelp logo

cloudcomputingproject2's Introduction

Get Startet

Install necessary packages with ansible

  1. If you don't have ansible already installed, install it first

  2. Dowload the subfolder Automatisierung under this link and unzip it anywhere on your local machine

  3. Open the file hosts and paste the ip adress of your compute engine after [ServerGruppe] and save the file

  4. Open terminal in this folder and type in it: ansible-playbook getcurl.yml

  5. Wait until ansible finished the installation

Create a mysql docker container

  1. To connect to the compute engine via ssh, type in terminal: ssh <IP_ADRESS_OF_COMPUTE_ENGINE>

  2. Type in terminal:

    • sudo service docker start # start docker service
    • sudo docker pull mysql # download mysql image
    • sudo docker run --name mysql_container -e MYSQL_ROOT_PASSWORD=admin123 -d mysql:latest # create docker container

Configure Database

  1. Connect to container with database

    • sudo docker inspect mysql_container # Get ip adres of container
    • sudo docker run -it --rm mysql mysql -h<IP_ADRESS_CONTAINER> -uroot -p # connect to container database
  2. Create new database and user

    • CREATE DATABASE translate CHARACTER SET UTF8; # Create translate database
    • CREATE USER 'admin'@'%' IDENTIFIED BY 'admin123'; # Create user admin
    • GRANT ALL PRIVILEGES ON * . * TO 'admin'@'%'; # Grant privileges to admin
    • FLUSH PRIVILEGES; # Update privileges
    • exit # exit database

Install depedencies

  1. Type in terminal:
    • sudo apt-get install python3-dev libmysqlclient-dev
    • pip3 install mysqlclient

Change app settings

  1. Go to /CloudComputing/CloudComputingProject/Translator/translate/translate, open settings.py and change the ip-address of the container with the database

  2. Go to /CloudComputing/CloudComputingProject/Translator/translate and type in Terminal:

    • Python3 manage.py migrate
    • Python3 manage.py runserver 0.0.0.0:80
  3. Open your browser and type in: <IP_ADRESS>:80/speaker #for example: http://35.184.11.167:80/speaker/

// Make sure that in your compute engines settings "Zugriffsbereiche für Cloud API" is set to "Uneingeschränkten Zugriff auf alle Cloud-APIs zulassen"

cloudcomputingproject2's People

Contributors

as14df avatar

Watchers

 avatar

cloudcomputingproject2's Issues

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.