Code Monkey home page Code Monkey logo

cms-test's Introduction

cms dockerized

Setting up

services: db and cms_dev.

Build and run:

foo@cms-test$ cd cms-dev/
foo@cms-dev$ docker compose -f docker-compose.yml up --build

(This should show the logs for the database)

In another terminal, run:

foo@cms-dev$ docker compose exec cms_dev bash

Now this should start an interactive shell for cms. Config file used is config/cms.conf.docker.sample to set the right host and port to connect to the database (db:5432). The user is set to cmsuser:cmsuser.

Run the script to check environment for isolate (used for sandboxes):

cmsuser@~/cms$ ./isolate-check-environment

The first 4 tests are enough to pass for isolate to work properly (to use --cg - See documentation

If they don't pass, you should set the kernel parameters from cmdline.txt on your host machine. You can't set them with sysctl. Edit /etc/default/grub by adding the line from cmdline.txt. Then run:

foo@/$ sudo update-grub
foo@/$ sudo reboot

Run the following commands to create a new user & database:

(if you don't want to modify cms.conf, let password be cmsuser)

cmsuser@~/cms$ createuser -h db -p 5432 --username=postgres --pwprompt cmsuser
cmsuser@~/cms$ createdb -h db -p 5432 --username=postgres --owner=cmsuser cmsdb

Grant permissions to user:

cmsuser@~/cms$ psql -h db -p 5432 --username=postgres --dbname=cmsdb --command='ALTER SCHEMA public OWNER TO cmsuser'
cmsuser@~/cms$ psql  -h db -p 5432 --username=postgres --dbname=cmsdb --command='GRANT SELECT ON pg_largeobject TO cmsuser'

Create the database schema for CMS:

cmsuser@~/cms$ cmsInitDB

Create your admin account:

cmsuser@~/cms$ cmsAddAdmin your_username -p your_password

To see logs of all the services running:

cmsuser@~/cms$ cmsLogService 0

Start all services:

cmsuser@~/cms$ cmsResourceService -a

More info about resources

In your web browser, navigate to http://localhost:8889 and enter your admin credentials.

After configuring a contest, you can manually add a user by using the web interface.

They can log in with their credentials at: http://localhost:8888.

Contest Filesystem

I cloned an example for the italian import format (in con_test-master). The loader was pre-installed in cms. To see more about configuration of a contest for this filesystem, see the doc.

To start a contest, go to con_test-master and run:

cmsuser@~/cms/con_test-master$ cmsImportUser --all -L italy_yaml .
cmsuser@~/cms/con_test-master$ cmsImportContest -i -L italy_yaml 

Done! ๐Ÿค 

cms-test's People

Contributors

irina-nita 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.