install as pandora user, fix locale

This commit is contained in:
j 2017-03-26 20:26:22 +02:00
parent 67551f2876
commit 2ea7dd3ed0
3 changed files with 10 additions and 9 deletions

View file

@ -3,9 +3,8 @@ Pan.do/ra Vagrant
1. Install Vagrant (https://www.vagrantup.com/)
2. Checkout this repository
3. Setup Vagrant
$ vagrant up && vagrant halt
3. Start Vagrant pan.do/ra
$ vagrant up
4. Open Browser at http://localhost:2620/
5. SSH into VM
$ vagrant ssh
$ sudo su pandora

4
Vagrantfile vendored
View file

@ -7,15 +7,17 @@ VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.hostname = 'pandora'
config.vm.guest = :ubuntu
#config.ssh.username = 'pandora'
config.package.name = 'pandora.box'
config.vm.box = "ubuntu/xenial64"
config.vm.box_url = "https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box"
config.vm.network "forwarded_port", guest: 80, host: 2620
config.vm.synced_folder ".", "/srv"
config.vm.synced_folder ".", "/srv", owner: 1001, group: 1001
config.vm.provision "shell", path: "install.sh"
config.vm.provision :shell, :inline => "sudo /srv/pandora/ctl start", run: "always"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ['modifyvm', :id, '--cpus', '2']
end
end

View file

@ -1,18 +1,18 @@
#!/bin/bash
if [ -x /srv/pandora ]; then
sudo -H -u vagrant /srv/pandora/update.py dev
sudo -H -u pandora /srv/pandora/update.py dev
else
export DEBIAN_FRONTEND=noninteractive
groupadd -g 1001 pandora
useradd -c 'pan.do/ra' -g pandora -m -u 1001 pandora
echo "pandora:pandora" | chpasswd
apt-get update -qq
apt-get install -y curl >/dev/null 2>&1
locale-gen en_US.UTF-8
export LANG=en_US.UTF-8
echo LANG=en_US.UTF-8 >> /etc/locale.conf
localectl set-locale LANG=C.UTF-8
curl -sL https://pan.do/ra-install > /srv/pandora_install.sh
chmod +x /srv/pandora_install.sh
echo "Installing pan.do/ra..."
echo "logging installation progress into pandora_install.log"
export PANDORA=ubuntu
/srv/pandora_install.sh >/srv/pandora_install.log 2>&1
rm /srv/pandora_install.sh
fi