GithubHelp home page GithubHelp logo

nherriot / noisy-atom-portal Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 27.32 MB

This is a web portal for the Noisy Atom company. It demonstrates some clever IoT technology and eCommerce platform capability with QR code generation and tracking built out the box.

Python 10.61% CSS 24.96% JavaScript 13.87% HTML 25.91% SCSS 24.44% Shell 0.03% Dockerfile 0.18%

noisy-atom-portal's People

Contributors

dilshadgit avatar nherriot avatar tine3700 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nh-accedian

noisy-atom-portal's Issues

ISU0039 Update postgresql-server fails

The postgresql-server update will not work with Ubuntu 18.04 or newer versions of Ubuntu.

sudo apt-get install postgresql-server-dev-9.3

Instead update to

sudo apt-get install -y postgresql-server-dev-10

ISU0035 Create a plain dockerfile and docker compose to just bring up a vanilla Linux machine with python installed and setup.

There is no vanilla docker file and docker compose to build the server. This should use a docker image for Python slim 3.8.
At the moment it should just bring up a working environment and deploy the packages.

The docker compose file should have space for 3 services. The only service that should be active is the one to bring up the default python slim image and install packages with no errors.

To complete this task:

  • Create a docker file to mount noisy atom and install packages from requirements.txt
  • Ensure it has a way to keep the container alive so that it can be checked.
  • Create a docker-compose file that just brings up the docker image. Allow naming of 3 more systems but they should do nothing.
  • Ensure the readme file is updated on how to check the docker file works.

ISU0025 Update system to use noisyatom.com

Figure out how to get the DNS entry to point to the NoisyAtom IP: 104.236.14.123

Let Ashlye Mills know you have done this.
Make sure that one other person can get to the URL.

Dockerizing Django with Postgres, Gunicorn, and Nginx

This is a step-by-step tutorial on how to configure Django to run on Docker with Postgres, Nginx and Gunicorn will be added for production environments.

This should be a vanilla Django 2 project with no relation to the Noisy Atom website.

  • Setup Docker
  • Setup Postgres
  • Setup Gunicorn
  • Production Dockerfile
  • Nginix as a reverse proxy

Get Ansible scripts working with the Noisy Atom web site.

Review the ansible scripts to ensure they work with Digital Oceans.
Ensure noisy atom can be deployed to a second Digital Ocean server before updating the site.
Once it works, update the new portal onto our Digital Ocean server.

To complete this task:

  • Check ansible scripts work deploying to a new digital ocean server.
  • Check documentation is correct.
  • Check the new Noisy Atom site is working and can be navigated.
  • [x ] Update any documents that need to be reviewed.

Pillow recommended version 6 for python3.8

Please check the link:
https://pillow.readthedocs.io/en/latest/installation.html

For Mac OS the pip install pillow==4.0.0 failed.

`
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

  Please see the install instructions at:
     http://pillow.readthedocs.io/en/latest/installation.html
  
  
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> Pillow`

Blog apps

When you are logged in as admin or default user.

The system is not working when:

  1. The user needs to change the image.
  2. They created without an image the user can't add image afterwords.

ISU0020 Create docker file to start Django

To complete this task you we need:

  • a docker file which can be run to bring up Django as a docker container using Python 3.8 slim version to reduce container size.
  • It has to be verified to run with one other developer.
  • It can be run locally and on a digital ocean server.

ISU00037 README.md fails at manage.py runserver

The runserver development tool fails.

  • Upgrade Django version to Django 2.2 in requirements.txt
  • Change from django.core.urlresolvers import reverse to from django.urls import reverse
  • add user = models.ForeignKey(settings.AUTH_USER_MODEL, default=1, on_delete=models.CASCADE, to models.py
  • remove permalink decorator in django.db.models use reverse function

ISU0040 Master fails: SystemCheckError

The errors are

?: (admin.E408) 'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in order to use the admin application.
?: (admin.E409) 'django.contrib.messages.middleware.MessageMiddleware' must be in MIDDLEWARE in order to use the admin application.

This can be fixed by setting Django==2.0.

ISU0030 Update requirements.txt so that it will run using Python Python 3.8.12

This task is to simply create a requirements.txt file that will run with no errors using Python 3.8.12

My system will not get past Pycops2 (postgres)
To complete this task:

  • Ensure requirements.txt will run with no errors.
  • Update readme so that it reflects any changes a developer has to do to install the software.

There are broken links on the blog page.

On the blog page there are broken links. They seem to point to a directory that does not exist.

blogs-broken-links-noisy-atom

The broken icons route to:
http://localhost:8000/media/None/helloword.jpg
http://localhost:8000/media/None/sublime.jpeg

To complete this task:

  • Ensure images are stored on a directory visible to the application before and after deployment if the images are not part of the database.
  • Ensure that the image name, directory and storage date are recorded in the database if the images is not part of the database.

ISU0021 Create docker file to start Postgres.

To complete this task you we need:

  • a docker file which can be run to bring up Postgres as a docker container using the current version of postgres running on digital ocean..
  • It has to be verified to run with one other developer.
  • It can be run locally and on a digital ocean server.

ISU0033 Upgrade the system to use Django Version 2

The current version of Django uses version 1.10. However, this only supports version 2.7, 3.4 and 3.5 of python. You can find details here:

https://docs.djangoproject.com/en/dev/releases/1.10/

We need to update the system to use Django 2.2. This may require fixes to the code base to make sure that it is also compatible with Django 2.2.

From following the documentation readme.md here:

https://github.com/nherriot/noisy-atom-portal/tree/master/documentation#check-the-django-application-works

It fails on line: 132

/> python manage.py runserver

The task is to get this to run with requirements.txt setting django version to 2.2.

ISU0022 Create docker file to start Gunicorn

To complete this task you we need:

  • a docker file which can be run to bring up Gunicorn as a docker container using Python 3.9 slim version to reduce container size.
  • It has to be verified to run with one other developer.
  • It can be run locally and on a digital ocean server.

ISU0034 When running up the server it defaults to 'production' build.

When running the command:

   /> python manage.py runserver

The system reports it's running as a production server. The system should always assume it's not production due to the way django is coupled to the settings.py

This can be seen here:

   /> python manage.py runserver

   ***** INFORMATION: PRODUCTION BUILD DEPLOYMENT *****
   ***** INFORMATION: PRODUCTION BUILD DEPLOYMENT *****
 

If a .env file can be used then this should be implemented. If this is too much, then this task can be put on the backlog.

To complete this task:

  • Update readme so that you tell people how to setup as dev or prod.
  • Try and create the start routing to default to development not production.
  • Ensure you communicate with the team about this and note in the pull request.

Remove all models that are not used on the system.

There are old models that are not used on the system. The only application that we use is the blog application.

Compare a vanilla Django application (e.g. a hello world django server) with noisy_atom. Make sure ALL models are removed.

After that wipe all migrations that are on the system. Then generate a brand new migration script. There should only be one migration script.
We will use this to wipe our live Database, since it has no data, and start everything from fresh. To complete the task:

  • Compare models with vanilla django server and remove all models and apps that are not in the vanilla list except the blogs app.
  • Remove all migrations. Check with documentation that this will not break anything.
  • Do one single migration. Check it works.
  • Verify django admin works.
  • Verify you can add/remove/update a blog.
  • Verify that all applications that are not used for django are removed. Remove all DJANGO applications from the syste.

ISU0038 Update Django 2.2 to Django 2.2.27 using Python 3.9.12

  • After upgrading Python 2.7 to a newer Python, Python 3.8 we will now focus on upgrading to a newer Python version which is Python 3.9.12.
  • In the same step we are upgrading Django 2.2 to Django 2.2.27.

This issue is not pressing and can be seen as training to get used to using GitHub, virtual environments and different versions of Django and Python.

Update SSL certificates on Live server

The live server uses lets encrypt.
The certificate is out of date. It has to be updated. Update the digital ocean droplet running the live server to use a new SSL certificate.
Make sure this has an update to our documentation so that we know how to do this in future.
If possible write an ansible script to do this in future.

To complete this task:

  • Update SSL certificate on noisyatom.tech
  • Update known_hosts in .ssh/ dir to contain new machines on our network.
  • Update documentation to say how this is done within our documentation folder.
  • If possible write an ansible script to do this and place it in the repository: https://github.com/NoisyAtom/noisyAtom_config

Remove all static content from the portal that is not part of noisy atom

The noisy atom website used a purchased template from creative tim.
The static content is full of images and content that we don't use. Remove all content that is not used as part of the noisy atom web site.

e.g.
static/assets/asset-for-demo
static/assets/img/examples
static/assets/faces/
shopping cart examples.... etc...etc...etc.

It's worth noting. That I got rejected from a contract role due to this content being in the noisy atom web site. They viewed this as an amateur web page with all the content copied from somewhere else. Even though all the images we show are our own images. !!!!!!!!!!!

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.