Giter VIP home page Giter VIP logo

devops's Introduction

Worldtime- Moscow

About The Project

Name: Ozioma Okonicha
Group: B18-SE01
Lab 1&2

CI to Docker Hub

Built With

  • Django python framework
    I chose to use this framework honestly because I have never used it before and was eager to explore it for the first time. Moreover, it enables rapid development of secure and maintainable websites. Also, there are good debugging tools, logging is already set up, and there's a server that automatically restarts with file changes.

Getting Started - Lab 1

To get a local copy up and running follow these simple steps.

Prerequisites

  • Ensure you have python3 by running the following command
    python3 --version
  • Install the virtual environment
    sudo apt install -y python3-venv

Installation

  1. Clone the repo
    git clone https://github.com/Ozziekins/devops.git
  2. Enter the working directory
    cd devops
    
    cd app_python
  3. Create the virtual environment
    python3 -m venv my_env
  4. Activate the virtual environment
    source my_env/bin/activate
  5. In your new environment, you can use pip to install Django
    pip3 install django
    
    django-admin --version
  6. Finally run the application and open to view on your browser at http://127.0.0.1:8000/
    python3 manage.py runserver 0.0.0.0:8020

Getting Started - Lab 2

To get the Docker image up and running follow these simple steps.

Prerequisites

  • Ensure you have docker by running the following command
    sudo docker run hello-world

Installation

  1. Clone the repo
    git clone https://github.com/Ozziekins/devops.git
  2. Enter the working directory
    cd devops
    
    cd app_python
  3. Create the virtual environment
    python3 -m venv my_env
  4. Activate the virtual environment
    source my_env/bin/activate
  5. In your new environment, you can use run the container using my image
    docker run -it -p 8020:8020 \
       -e DJANGO_SUPERUSER_USERNAME=admin \
       -e DJANGO_SUPERUSER_PASSWORD=some_password1234 \
       -e [email protected] \
       ozziekins/django-pythonapp:latest
    or run directly from docker hub
    docker run -it -p 8020:8020 ozziekins/django-pythonapp:latest
  6. Finally open to view on your browser at http://0.0.0.0:8020/

Unit tests

In order to run the tests, perform the following in the /devops/app_python/python_app directory

   pytest

Lab 12- Endpoints

  • /: root path that shows the time in Moscow
  • /visits: shows the time when a client visited the root path

Contact

Email: innopolis email

Project Link: https://github.com/Ozziekins/devops

devops's People

Contributors

ozziekins avatar

Watchers

 avatar

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.