Giter Club home page Giter Club logo

cusdeb-single-node's Introduction

cusdeb-single-node

The project is a set of scripts intended for simplifying deployment of CusDeb for developing purposes.

Installation

Install packages.

sudo apt install git docker docker-compose curl pkg-config pandoc supervisor python3-pip virtualenv postgresql postgresql-server-dev-all qemu-user-static whois -y

Clone project.

git clone [email protected]:tolstoyevsky/cusdeb-single-node.git

Create directory cusdeb.

mkdir cusdeb

Build project in directory cusdeb.

cd cusdeb-single-node
sudo ./single-node.sh build ../cusdeb

Usage

Script supports the following parameters:

Parameter Description
build <target_directory> Setup all CusDeb services with all dependences to the <target_directory>. It supposed to be empty.
create-superuser Create superuser for Django admin interface (see the corresponding section in the official documentation).
dbshell Connect to the project's database (see the corresponding section in the official documentation).
list List all services.
loaddata <fixture> Read the data from the specified fixture and load it into the database (note that <fixture> must be a full path to the fixture file) (see the corresponding section in the official documentation).
makemigrations Generate migrations based on changes in models (see the corresponding section in the official documentation).
migrate Apply all migrations (see the corresponding section in the official documentation).
rebuild [<fast>] Clean the directory the CusDeb services were installed to (see the build command) and re-setup all the services. By default, the chroot environments will be left when cleaning the directory. If you want to re-setup not only the CusDeb services but also chroot environments, pass full as the first argument to rebuild.
remove Clean the directory the CusDeb services were installed to (see the build command).
restart Restart all services.
shell Start Python interpreter with established enviroment.
start Start all services.
stop <service> Stop the specified service.
stop-all Stop all services.

When you start services you can specify the ports for them via the BM_PORT and DOMINION_PORT environment variables. For example:

sudo env BM_PORT=9000 ./single-node.sh start

Default ports are:

Service Default
CusDeb Web Client 8000
CusDeb API 8001
Black Magic 8002
Dominion 8003
Orion 8004
CusDeb Helpik 8005
CusDeb Tz 8006
CusDeb Anonymous 8007

Authors

See AUTHORS.

Licensing

cusdeb-single-node is available under the Apache License, Version 2.0.

cusdeb-single-node's People

Contributors

denismosolov avatar eugulixes avatar imago-dzarne avatar irovoyvlad avatar karpa4o4 avatar mdanil007 avatar polina-popova avatar themanwhosmellslikesugar avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cusdeb-single-node's Issues

Add the possibility to change the location of volumes on host

By default, the location of volumes on host is /srv, but in some cases Docker may complain

docker: Error response from daemon: error while creating mount source path '/srv/mongodb': mkdir /srv/mongodb: read-only file system.

It's necessary to add a new parameter to cusdeb-single-node which will allow to change the location.

An error when run ./single-node stop

Info: killing unix:///var/run/cusdeb-supervisor.sock
./single-node.sh: line 382: kill: -unix:///var/run/cusdeb-supervisor.sock: arguments must be process or job IDs

Allow `makemessages` for .txt and .py files

There is .txt files which refer to password recovery (the email body and title) - it would be nice to be able make translation messages for them automatically.
What about .py files - if we add them it will be possible to translate forms placeholders, for example.

Implement the restart command

sudo ./single-node.sh restart
[sudo] пароль для danil: 
+ export HOST=localhost
+ HOST=localhost
+ export PROXY_PORT=8000
+ PROXY_PORT=8000
+ export DASHBOARD_PORT=8001
+ DASHBOARD_PORT=8001
+ export DJANGO_CONFIGURATION=Docker
+ DJANGO_CONFIGURATION=Docker
+ export BM_PORT=8002
+ BM_PORT=8002
+ export DOMINION_PORT=8003
+ DOMINION_PORT=8003
+ export MONGO_DATABASE=cusdeb
+ MONGO_DATABASE=cusdeb
+ export MONGO_HOST=localhost
+ MONGO_HOST=localhost
+ export MONGO_PORT=33018
+ MONGO_PORT=33018
+ export MONGO_TAG=3.2
+ MONGO_TAG=3.2
+ export PG_DATABASE=cusdeb
+ PG_DATABASE=cusdeb
+ export PG_HOST=localhost
+ PG_HOST=localhost
+ export PG_PASSWORD=secret
+ PG_PASSWORD=secret
+ export PG_PORT=54321
+ PG_PORT=54321
+ export PG_TAG=9.4
+ PG_TAG=9.4
+ export PG_USER=postgres
+ PG_USER=postgres
+ export RABBITMQ_PORT=5672
+ RABBITMQ_PORT=5672
+ export RABBITMQ_TAG=3.7
+ RABBITMQ_TAG=3.7
+ export REDIS_HOST=localhost
+ REDIS_HOST=localhost
+ export REDIS_PORT=63791
+ REDIS_PORT=63791
+ export REDIS_TAG=3.2
+ REDIS_TAG=3.2
+ export 'TOKEN_KEY=gl3q^2f^fh)b=&g)*cah9h5n-d#if9k3s1#tnz2hre$1ea1zd^'
+ TOKEN_KEY='gl3q^2f^fh)b=&g)*cah9h5n-d#if9k3s1#tnz2hre$1ea1zd^'
++ get_owner .
++ ls -ld .
++ awk '{print $3}'
+ export USER=danil
+ USER=danil
+ export VOLUME_PREFIX=/home/danil
+ VOLUME_PREFIX=/home/danil
+ set +x
Info: checking dependencies
stub

Create manual

Let's create to manual on how to set project on dev envionment

Bug with celery

Python 3.7 can't find the celery module. The worker can't launch and return exist status 1.

Use Pieman toolset

Drop

        info "cloning debootstap git repo"
        pushd "${TARGET}"/pieman
            sudo -u "${USER}" git clone https://anonscm.debian.org/git/d-i/debootstrap.git
            sudo -u "${USER}" git -C debootstrap checkout "${DEBOOTSTRAP_VER}"
        popd

on clone step, let's use Pieman toolset instead, see tolstoyevsky/pieman#93

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.