Skip to content

Commit

Permalink
various fixes breaking the installation process
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Käser committed Nov 11, 2015
1 parent 0d07a5e commit 17c0f6d
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 80 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ coco/web/static/bower_components
coco/web/static/css/main.css
# mkdocs generated files
coco/web/static/docs/user-guide/*
# migrations
**/migrations/*
2 changes: 1 addition & 1 deletion coco/core/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
description='The full class path of the user backend to use.')

config.set('USER_BACKEND_ARGS',
default='{"server": "coco_ldap", "base_dn": "dc=coco,dc=ldap", "users_dn": "ou=users"}',
default='{"server": "coco_ldap", "base_dn": "dc=coco,dc=ldap", "users_dn": "ou=_users"}',
editable=True,
description="""The arguments needed to instantiate the provided user backend class.
Please provide in json format (i.e. {'arg1': "val1", 'arg2': "val2"}).""")
Expand Down
Empty file.
4 changes: 2 additions & 2 deletions coco/core/signals/notifications.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from coca.core.models import CollaborationGroup, Notification, \
from coco.core.models import CollaborationGroup, Notification, \
NotificationLog
from coca.core.signals.signals import *
from coco.core.signals.signals import *
from django.db.models.signals import m2m_changed, post_delete, post_save
from django.dispatch import receiver

Expand Down
1 change: 0 additions & 1 deletion coco/web/static/css/bootstrap-multiselect.css

This file was deleted.

15 changes: 0 additions & 15 deletions coco/web/static/css/components.css

This file was deleted.

23 changes: 0 additions & 23 deletions coco/web/static/css/plugins.css

This file was deleted.

4 changes: 2 additions & 2 deletions coco/web/static/less/components.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Navbar
// --------------------------
.-navbar
.coco-navbar
{
margin-bottom: 30px;
background-color: #3465a4;
Expand Down Expand Up @@ -34,4 +34,4 @@
border-radius: 50%;
text-align: center;
padding: 0;
}
}
3 changes: 2 additions & 1 deletion docs/install/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ As we are using `LESS` to produce `CSS` and `bower` to manage external dependenc
```bash
$ cd coco/web/static
$ bower install --allow-root # installs external dependencies
$ mkdir css
$ lessc less/main.less css/main.css # compile LESS to CSS
$ cd ../../..
```
Expand All @@ -344,8 +343,10 @@ $ mkdocs build --clean
Last but not least, finalize the whole setup by issueing:

```bash
cd /srv/coco/_repo
python manage.py collectstatic
python manage.py createsuperuser
ln -s /srv/coco/_repo /srv/coco/www
```

which will create a local superuser account (the admin account).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ "$EUID" -ne 0 ]; then
exit 1
fi

CT_NAME="coco_wui"
CT_NAME="coco_app"
CMD="/sbin/my_init -- /usr/bin/uwsgi_python --ini /srv/coco/_repo/lib/confs/uwsgi/coco.ini"

echo "------------------------------------------------------------"
Expand All @@ -32,7 +32,7 @@ echo "Committing the WUI container so we can create a new one from it..."
echo "------------------------------------------------------------"
sleep 2

docker commit $CT_NAME coco/wui:install
docker commit $CT_NAME coco/app:install
docker rm $CT_NAME

echo "------------------------------------------------------------"
Expand All @@ -43,8 +43,9 @@ sleep 2
# create the new container with mounted directories
docker run \
--detach=true --interactive=false \
--restart=always \
--name="${CT_NAME}" \
-p 80:80 \
--link coco_ldap:coco_ldap --link coco_postgresql:coco_postgresql \
-v /srv/coco/data:/srv/coco/data \
coco/wui:init $CMD
coco/app:install $CMD
3 changes: 2 additions & 1 deletion lib/scripts/create_ldap_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ echo "------------------------------------------------------------"
sleep 2

docker run \
--restart=always \
--name "${CT_NAME}" \
-v /srv/coco/ldap:/var/lib/ldap \
-p 389:389 \
-p 192.168.0.1:389:389 \
-e LDAP_DOMAIN="coco.ldap" \
-e LDAP_ORGANISATION="coco" \
-e LDAP_ROOTPASS="${PASSWORD}" \
Expand Down
3 changes: 2 additions & 1 deletion lib/scripts/create_postgresql_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ echo "------------------------------------------------------------"
sleep 2

docker run \
--restart=always \
--name "${CT_NAME}" \
-v /srv/coco/postgresql:/var/lib/postgresql/data \
-e POSTGRES_USER="coco" \
-e POSTGRES_PASSWORD="${PASSWORD}" \
-d postgres:9.4.0
-d postgres

echo "------------------------------------------------------------"
echo "All done!"
Expand Down
31 changes: 3 additions & 28 deletions lib/scripts/setup_docker_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ if [ "$EUID" -ne 0 ]; then
exit 1
fi

echo "------------------------------------------------------------"
echo "Note: During installation, you'll be prompted with a dialog to configure the LDAP client."
echo "Make sure you enter 'ldap://127.0.0.1/' and 'dc=coco,dc=ldap'."
echo "------------------------------------------------------------"
sleep 2

# detect the package manager
if `which apt-get &> /dev/null`; then
PS="deb"
Expand Down Expand Up @@ -65,32 +59,13 @@ mkdir -p $DATA
mkdir -p $DATA/ldap
mkdir -p $DATA/postgresql
# create the directories for the users and shares
mkdir -p $DATA/homes
mkdir -p $DATA/public
mkdir -p $DATA/shares
mkdir -p $DATA/data/homes
mkdir -p $DATA/data/public
mkdir -p $DATA/data/shares
# ensure secure permissions. just in cast a custom umask is set
chown -R root:root $DATA
chmod -R 0755 $DATA

# install the LDAP client tools
# we need to know all LDAP users because the home/share directories will belong to them
echo "------------------------------------------------------------"
echo "Going to install the PAM LDAP package..."
echo "When asked for the nsswitch services to configure, choose 'group', 'passwd' and 'shadow'."
echo "------------------------------------------------------------"
sleep 2
if [ $PS == "deb" ]; then
$INSTALL libpam-ldap
else
$INSTALL nss-pam-ldapd
authconfig-tui
# disable caching server, made problems
systemctl stop nslcd.service
systemctl disable nslcd.service
fi
# configure that we want to use LDAP for passwd etc.
sed -i 's/compat/compat ldap/' /etc/nsswitch.conf

echo "------------------------------------------------------------"
echo "All done! You should now reboot the machine."
echo "------------------------------------------------------------"

0 comments on commit 17c0f6d

Please sign in to comment.