Difference between revisions of "Installing Bedework"

From Motorcycle Action Group Wiki
Jump to: navigation, search
(Fire it up)
(Fire it up)
 
Line 210: Line 210:
  
 
   Username: admin
 
   Username: admin
   Password: <the usual>
+
   Password: bedework

Latest revision as of 01:36, 4 December 2015

Separate Data Volume

This thing is pretty big and has potential to get bigger still, so separate to a new filesystem.

Check what volume groups are present ... in this case vgs_webhost is SSD based disk and vgd_webhost is hard drives

  [root@webhost ~]# pvscan
    PV /dev/vdb1   VG vgd_webhost   lvm2 [3.90 GiB / 3.90 GiB free]
    PV /dev/vda2   VG vgs_webhost   lvm2 [31.00 GiB / 7.18 GiB free]
    Total: 2 [34.90 GiB] / in use: 2 [34.90 GiB] / in no VG: 0 [0   ]

Peel off a logical volume from the hard drive surce

  [root@webhost ~]# lvcreate -L 2G -n bedework vgd_webhost
    Logical volume "bedework" created.

Make the filesystem

  [root@webhost ~]# mkfs /dev/mapper/vgd_webhost-bedework 
  mke2fs 1.42.9 (28-Dec-2013)
  Filesystem label=
  OS type: Linux
  Block size=4096 (log=2)
  Fragment size=4096 (log=2)
  Stride=0 blocks, Stripe width=0 blocks
  131072 inodes, 524288 blocks
  26214 blocks (5.00%) reserved for the super user
  First data block=0
  Maximum filesystem blocks=536870912
  16 block groups
  32768 blocks per group, 32768 fragments per group
  8192 inodes per group
  Superblock backups stored on blocks: 
  	32768, 98304, 163840, 229376, 294912
  
  Allocating group tables: done                            
  Writing inode tables: done                            
  Writing superblocks and filesystem accounting information: done 

Add the new volume to fstab

  [root@webhost ~]# vi /etc/fstab

This is the entry

  /dev/mapper/vgd_webhost-bedework /var/lib/bedework          ext4    defaults        1 2

Make the mountpoint

  [root@webhost ~]# mkdir  /var/lib/bedework/

Use -a flag to double check /etc/fstab entry

[root@webhost ~]# mount -a

Check

  [root@webhost ~]# df -h /var/lib/bedework/
  Filesystem                        Size  Used Avail Use% Mounted on
  /dev/mapper/vgd_webhost-bedework  2.0G  3.0M  1.9G   1% /var/lib/bedework

Privilege Separation

Bedework comes as an all in one self contained system in the style of the old school Unix days. However, given the large number of moving parts, this isn't a bad plan. In order to prevent any other processes using anything in the bedework zone of operations, and vice versa, bedework has it's own user account and group, the files all go in the bedework home directory, to which only the bedework user has access.

All of the following is based on procedures from The Bedework Manual

Create the group

  # groupadd -r bedework

Find out the gid

  # getent group bedework
  bedework:x:508:

A local system account with a home directory in /var/lib and that gid

  # useradd -r -g 508 -c "Bedework User" -d /var/lib/bedework -m -s /bin/bash bedework

Check the account

  # fgrep bede /etc/passwd
  bedework:x:542:508:Bedework User:/var/lib/bedework:/bin/bash

No need for a password, this user will be accessed either from root, or by ssh key.

Check the locality

  [root@webhost ~]# su - bedework
  [bedework@webhost ~]$ 

What's here

  [bedework@webhost ~]$ ls -la
  total 374760
  drwxr-x---.  3 bedework bedework      4096 Dec  4 00:42 .
  drwxr-xr-x. 39 root     root          4096 Dec  4 00:43 ..
  -rw-------.  1 bedework bedework       139 Dec  4 00:02 .bash_history
  -rw-r--r--.  1 bedework bedework        18 Mar  5  2015 .bash_logout
  -rw-r--r--.  1 bedework bedework       193 Mar  5  2015 .bash_profile
  -rw-r--r--.  1 bedework bedework       231 Mar  5  2015 .bashrc
  drwx------.  2 root     root         16384 Dec  4 00:28 lost+found
  -rw-rw-r--.  1 bedework bedework 383332167 Nov 17 18:37 quickstart-3.10.2.zip

How much space and on what

  [bedework@webhost ~]$ df -h .
  Filesystem                        Size  Used Avail Use% Mounted on
  /dev/mapper/vgd_webhost-bedework  2.0G  369M  1.6G  20% /var/lib/bedework

Download and install

Download Bedework Here

Login as user bedework

  [bedework@webhost ~]$

Fetch the zipfile, warning, it's 350+ Megabytes

  [bedework@webhost ~]$ wget "http://dev.bedework.org/downloads/3.10.2/quickstart-3.10.2.zip"
  --2015-12-03 23:52:50--  http://dev.bedework.org/downloads/3.10.2/quickstart-3.10.2.zip
  Resolving dev.bedework.org (dev.bedework.org)... 128.113.2.72
  Connecting to dev.bedework.org (dev.bedework.org)|128.113.2.72|:80... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 383332167 (366M) [application/zip]
  Saving to: ‘quickstart-3.10.2.zip’
  
  100%[=============================================================================>] 383,332,167  860KB/s   in 6m 39s 
  
  2015-12-03 23:59:29 (939 KB/s) - ‘quickstart-3.10.2.zip’ saved [383332167/383332167]

Then unpack it

  [bedework@webhost ~]$ unzip quickstart-3.10.2.zip
  .....
  .....

Now there's a new director

  [bedework@webhost ~]$ ls -la quickstart-3.10.2
  total 224
  drwxr-xr-x. 38 bedework bedework 4096 Nov  5 18:39 .
  drwxr-x---.  4 bedework bedework 4096 Dec  4 00:47 ..
  drwxrwxr-x.  6 bedework bedework 4096 Nov  5 18:43 access
  drwxr-xr-x.  5 bedework bedework 4096 Jul 23 19:20 apache-ant-1.7.0
  drwxr-xr-x.  8 bedework bedework 4096 Jul 23 19:19 apacheds-1.5.3-fixed
  drwxrwxr-x.  8 bedework bedework 4096 Oct 29 14:30 bedenote
  drwxrwxr-x.  9 bedework bedework 4096 Nov  5 18:43 bedework
  drwxrwxr-x. 13 bedework bedework 4096 Nov  5 18:42 bedework-carddav
  -rw-r--r--.  1 bedework bedework  262 Jul 23 19:19 build.xml
  -rwxr-xr-x.  1 bedework bedework   62 Jul 23 19:19 bw
  -rw-r--r--.  1 bedework bedework  144 Jul 23 19:19 bwaddgroup
  -rwxr-xr-x.  1 bedework bedework  144 Jul 23 19:19 bwaddgroupmember
  -rwxr-xr-x.  1 bedework bedework  143 Jul 23 19:19 bwadduser
  drwxrwxr-x.  6 bedework bedework 4096 Nov  5 18:43 bwannotations
  -rw-r--r--.  1 bedework bedework  251 Jul 23 19:19 bw.bat
  drwxrwxr-x. 11 bedework bedework 4096 Nov  5 18:43 bwcalcore
  drwxrwxr-x.  6 bedework bedework 4096 Nov  5 18:43 bwcaldav
  drwxrwxr-x.  5 bedework bedework 4096 Nov  5 18:43 bwcalFacade
  drwxrwxr-x.  5 bedework bedework 4096 Oct 29 14:31 bwdeployutil
  drwxrwxr-x.  5 bedework bedework 4096 Nov  5 18:43 bwical
  -rw-r--r--.  1 bedework bedework   64 Jul 23 19:19 bwinitdir
  -rwxr-xr-x.  1 bedework bedework  232 Jul 23 19:19 bwinstall
  drwxrwxr-x.  5 bedework bedework 4096 Nov  5 18:43 bwinterfaces
  drwxrwxr-x.  5 bedework bedework 4096 Nov  5 18:43 bwsysevents
  drwxrwxr-x.  8 bedework bedework 4096 Oct 29 14:31 bwtools
  drwxrwxr-x. 10 bedework bedework 4096 Nov  5 18:43 bwtzsvr
  drwxrwxr-x. 14 bedework bedework 4096 Nov  5 18:43 bwwebapps
  drwxrwxr-x. 19 bedework bedework 4096 Nov  5 18:43 bwxml
  drwxrwxr-x.  6 bedework bedework 4096 Nov  5 18:43 caldav
  drwxrwxr-x.  7 bedework bedework 4096 Oct 29 14:31 caldavTest
  drwxr-xr-x.  4 bedework bedework 4096 Jul 23 19:20 data
  drwxrwxr-x.  6 bedework bedework 4096 Nov  5 18:43 dumprestore
  drwxrwxr-x. 11 bedework bedework 4096 Nov  5 18:43 eventreg
  -rw-r--r--.  1 bedework bedework  145 Jul 23 19:19 fix-unix-modes.sh
  drwxrwxr-x.  5 bedework bedework 4096 Nov  5 18:43 indexer
  drwxr-xr-x.  8 bedework bedework 4096 Jul 23 19:19 jboss-5.1.0.GA
  drwxr-xr-x.  2 bedework bedework 4096 Jul 23 19:19 logs
  drwxrwxr-x.  7 bedework bedework 4096 Oct 29 14:31 monitor
  drwxrwxr-x.  7 bedework bedework 4096 Oct 29 14:31 naming
  -rw-r--r--.  1 bedework bedework  133 Jul 23 19:19 README
  drwxrwxr-x.  6 bedework bedework 4096 Nov  5 18:43 rpiutil
  -rwxr-xr-x.  1 bedework bedework   67 Jul 23 19:19 runcache
  -rw-r--r--.  1 bedework bedework  248 Jul 23 19:19 runcache.bat
  drwxrwxr-x. 10 bedework bedework 4096 Nov  5 18:42 selfreg
  -rwxr-xr-x.  1 bedework bedework   69 Jul 23 19:19 startjboss
  -rw-r--r--.  1 bedework bedework   85 Jul 23 19:19 startjboss.bat
  drwxr-xr-x.  2 bedework bedework 4096 Jul 23 19:20 sv
  -rwxr-xr-x.  1 bedework bedework 2623 Jul 23 19:19 svnco.sh
  drwxrwxr-x.  9 bedework bedework 4096 Nov  5 18:43 synch
  drwxrwxr-x.  9 bedework bedework 4096 Oct 29 14:31 testsuite
  -rw-rw-r--.  1 bedework bedework  548 Nov  5 18:39 VERSION.properties
  -rw-rw-r--.  1 bedework bedework  326 Oct 29 14:34 VERSION.properties~
  -rw-rw-r--.  1 bedework bedework  441 Oct 29 15:00 VERSION.properties.OLD
  drwxr-xr-x. 10 bedework bedework 4096 Jul 23 19:19 vert.x
  drwxr-xr-x.  9 bedework bedework 4096 Jul 23 19:19 vert.x.OLD
  drwxrwxr-x.  5 bedework bedework 4096 Nov  5 18:43 webdav

Fire it up

See Running Bedework

The quickstart instance is running, so a port redirect over ssh uaing:

  $ ssh -v -L 8080:localhost:8080 root@webhost.mag-uk.org

On your local Linux machine, then please see MAG Bedework Login

  Username: admin
  Password: bedework