Skip to content

Instantly share code, notes, and snippets.

@neskoc
Created January 14, 2021 15:55
Show Gist options
  • Save neskoc/cd69aa64e15cde8131eceb5eac560b8a to your computer and use it in GitHub Desktop.
Save neskoc/cd69aa64e15cde8131eceb5eac560b8a to your computer and use it in GitHub Desktop.
dbwebb trouble
### Lets check the installed commands:
bash git ssh rsync wget curl.
Press enter to continue...
# bash /usr/local/bin/bash GNU bash, version 5.0.18(1)-release (x86_64-apple-darwin17.7.0)
# git /usr/local/bin/git git version 2.29.2
# ssh /usr/bin/ssh OpenSSH_7.8p1, LibreSSL 2.6.2
# rsync /usr/local/bin/rsync rsync version 3.2.3 protocol version 31
# wget /usr/local/bin/wget GNU Wget 1.20.3 built on darwin17.7.0.
# curl /Users/nesko/opt/anaconda3/bin/curl curl 7.71.1 (x86_64-apple-darwin13.4.0) libcurl/7.71.1 OpenSSL/1.1.1i zlib/1.2.11 libssh2/1.9.0
### Lets check who you are.
Press enter to continue...
whoami: 'nesko'
$HOME: '/Users/nesko'
$HOMEPATH (win): ''
$USERPROFILE (win): ''
### Lets check the dbwebb.config file.
Press enter to continue...
$DBW_CONFIG_FILE: '/Users/nesko/.dbwebb.config'
ls -l $DBW_CONFIG_FILE: '-rw-r--r-- 1 nesko staff 299 Jan 14 14:48 /Users/nesko/.dbwebb.config'
file $DBW_CONFIG_FILE: '/Users/nesko/.dbwebb.config: ASCII text'
cat $DBW_CONFIG_FILE:
DBW_USER='necu20'
DBW_HOST='ssh.student.bth.se'
DBW_WWW_HOST='http://www.student.bth.se/'
DBW_SSH_KEY="/Users/nesko/.ssh/dbwebb"
DBW_REMOTE_BASEDIR='dbwebb-kurser'
DBW_REMOTE_WWWDIR='www/dbwebb-kurser'
DBW_BASEURL='http://www.student.bth.se/~necu20/dbwebb-kurser'
DBW_LABURL='https://lab.dbwebb.se'
### Check if we can ping bth.se.
Press enter to continue...
ping -c 1 bth.se:
'PING bth.se (213.52.129.125): 56 data bytes
64 bytes from 213.52.129.125: icmp_seq=0 ttl=53 time=26.304 ms
--- bth.se ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 26.304/26.304/26.304/0.000 ms'
### Try login to the student server and execute a command.
Press enter to continue...
ssh necu20@ssh.student.bth.se 'pwd && ls -ld dbwebb-kurser && ls -l dbwebb-kurser':
necu20@ssh.student.bth.se's password:
/home/saxon/students/20202/necu20
drwx------ 8 necu20 20202 4096 Jan 14 14:49 dbwebb-kurser/
total 24
drwxr-xr-x 4 necu20 20202 4096 Jan 14 15:00 databas/
drwxr-xr-x 5 necu20 dbwebb-kurser 4096 Nov 26 18:28 design/
drwxr-xr-x 5 necu20 dbwebb-kurser 4096 Oct 3 00:24 htmlphp/
drwxr-xr-x 4 necu20 20202 4096 Sep 2 02:27 javascript1/
drwxrwxr-x 5 necu20 20202 4096 Jan 2 20:33 js/
drwxr-xr-x 5 necu20 20202 4096 Oct 21 15:56 python/
### Try login to the student server using ssh-keys.
Press enter to continue...
$DBW_SSH_KEY: '/Users/nesko/.ssh/dbwebb'
$DBW_SSH_KEY_OPTION: '-i '/Users/nesko/.ssh/dbwebb''
ls -ld /Users/nesko/.ssh: 'drwx------ 14 nesko staff 476 Dec 24 01:21 /Users/nesko/.ssh'
ls -l /Users/nesko/.ssh:'total 104
-r--------@ 1 nesko staff 1674 Sep 20 23:24 aws.pem
-rw-r--r-- 1 nesko staff 249 Dec 24 01:21 config
-rw-------@ 1 nesko staff 1823 Aug 3 03:05 dbwebb
-rw-------@ 1 nesko staff 399 Aug 3 03:05 dbwebb.pub
-rw-------@ 1 nesko staff 3381 Oct 31 17:12 github_rsa
-rw-r--r--@ 1 nesko staff 742 Oct 31 17:12 github_rsa.pub
-rw------- 1 nesko staff 1381 Aug 3 10:56 id_dsa
-rw------- 1 nesko staff 607 Aug 3 10:56 id_dsa.pub
-rw------- 1 nesko staff 1823 Aug 3 10:55 id_rsa
-rw------- 1 nesko staff 399 Aug 3 10:55 id_rsa.pub
-rw-r--r--@ 1 nesko staff 4636 Jan 3 12:53 known_hosts
-rw------- 1 nesko staff 399 Aug 3 11:00 nesko@192.168.1.85'
$SSH_CMD: 'ssh necu20@ssh.student.bth.se -i '/Users/nesko/.ssh/dbwebb''
/home/saxon/students/20202/necu20
### Lets do some checks with your course repo. You must 'cd' into a valid course repo, for example python or htmlphp.
Press enter to continue...
$DBW_COURSE_DIR: '/Users/nesko/test-databas/databas'
ls -ld /Users/nesko/test-databas/databas/..:
drwxr-xr-x 4 nesko staff 136 Jan 14 16:46 /Users/nesko/test-databas/databas/..
ls -l /Users/nesko/test-databas/databas/..:
total 0
drwxr-xr-x 29 nesko staff 986 Jan 14 16:47 databas
### Lets init the course repo, step by step.
Press enter to continue...
dbwebb-init-me:
Press enter to continue...
Creating and initiating the directory structure in 'me/' (will not overwrite existing files).
Executing command:
createDirsInMeFromMapFile
-----------------------------------------
me/skolan
me/kmom01/klient
me/kmom02/js
me/kmom02/search
me/kmom02/terminal1
me/kmom03/cli
me/kmom03/terminal2
me/kmom03/er1
me/kmom04/er2
me/kmom04/trans
me/kmom04/myexpress
me/kmom04/express-sql
me/kmom05/prog
me/kmom05/crud
me/kmom05/eshop1
me/kmom06/func
me/kmom06/index
me/kmom06/eshop2
me/kmom10/eshop3
me/kmom10/try1
me/kmom10/try2
me/kmom10/try3
me/kmom10/prep
me/redovisa
-----------------------------------------
DONE to init the directory 'me/'.
dbwebb-init-server:
Press enter to continue...
Intiating the remote server 'ssh.student.bth.se' by connecting as 'necu20' and creating directories (if needed) where all uploaded files will reside.
Executing command:
ssh necu20@ssh.student.bth.se -i '/Users/nesko/.ssh/dbwebb' 'sh -c "if [ ! -d "dbwebb-kurser" ]; then mkdir "dbwebb-kurser"; fi; chmod 700 "dbwebb-kurser"; echo; echo "dbwebb-kurser:"; ls -lF "dbwebb-kurser"; if [ ! -d "www/dbwebb-kurser" ]; then mkdir "www/dbwebb-kurser"; fi; chmod 755 "www/dbwebb-kurser"; echo; echo "www/dbwebb-kurser:"; ls -lF "www/dbwebb-kurser""'
-----------------------------------------
dbwebb-kurser:
total 24
drwxr-xr-x 4 necu20 20202 4096 Jan 14 15:00 databas/
drwxr-xr-x 5 necu20 dbwebb-kurser 4096 Nov 26 18:28 design/
drwxr-xr-x 5 necu20 dbwebb-kurser 4096 Oct 3 00:24 htmlphp/
drwxr-xr-x 4 necu20 20202 4096 Sep 2 02:27 javascript1/
drwxrwxr-x 5 necu20 20202 4096 Jan 2 20:33 js/
drwxr-xr-x 5 necu20 20202 4096 Oct 21 15:56 python/
www/dbwebb-kurser:
total 28
drwxr-xr-x 4 necu20 20202 4096 Jan 14 15:00 databas/
drwxr-xr-x 5 necu20 20202 4096 Nov 26 18:28 design/
drwxr-xr-x 4 necu20 20202 4096 Oct 9 01:28 htmlphp/
drwxr-xr-x 4 necu20 20202 4096 Oct 7 20:03 inspect/
drwxr-xr-x 4 necu20 20202 4096 Sep 2 02:27 javascript1/
drwxrwxr-x 4 necu20 20202 4096 Dec 13 19:29 js/
drwxr-xr-x 5 necu20 20202 4096 Oct 21 15:56 python/
-----------------------------------------
DONE to init the base dirs on the server.
dbwebb-init-structure-dbwebb-kurser:
Press enter to continue...
Ensuring that the directory structure exists on the server by syncing directory structure to dbwebb-kurser/ (will not overwrite existing files).
Executing command:
rsync -av --chmod=Du+rwx,Dgo+rx,Fu+rw,Fgo+r --exclude example --include-from='/Users/nesko/test-databas/databas/.dbwebb/upload.include' --exclude-from='/Users/nesko/test-databas/databas/.dbwebb/upload.exclude' --include='*/' --include='.??*' --exclude='*' -e "ssh -i '/Users/nesko/.ssh/dbwebb'" '/Users/nesko/test-databas/databas/' 'necu20@ssh.student.bth.se:dbwebb-kurser/databas/'
-----------------------------------------
sending incremental file list
./
.dbwebb-validate.config
.dbwebb.course
.dbwebb.map
.dbwebb.moss
.eslintrc.json
.html-minifier.conf
.htmlhintrc
.phpcs.xml
.phpmd.xml
.stylelintrc.json
.dbwebb/
.dbwebb/cli.version
.dbwebb/course
.dbwebb/inspect
.dbwebb/lab.version
.dbwebb/upload.exclude
.dbwebb/upload.include
.dbwebb/validate.exclude
.dbwebb/inspect-src/
.dbwebb/script/
.dbwebb/web/
sent 1,262 bytes received 594 bytes 1,237.33 bytes/sec
total size is 18,855 speedup is 10.16
-----------------------------------------
DONE to init the directory structure on the server.
dbwebb-init-structure-www-dbwebb-kurser:
Press enter to continue...
Ensuring that the directory structure exists on the server by syncing the me/ directory structure to www/dbwebb-kurser (will not overwrite existing files).
Executing command:
rsync -av --chmod=Du+rwx,Dgo+rx,Fu+rw,Fgo+r --exclude example --include-from='/Users/nesko/test-databas/databas/.dbwebb/upload.include' --exclude-from='/Users/nesko/test-databas/databas/.dbwebb/upload.exclude' --include='*/' --exclude='*' -e "ssh -i '/Users/nesko/.ssh/dbwebb'" '/Users/nesko/test-databas/databas/' 'necu20@ssh.student.bth.se:www/dbwebb-kurser/databas/'
-----------------------------------------
sending incremental file list
./
.dbwebb-validate.config
.dbwebb.course
.dbwebb.map
.dbwebb.moss
.eslintrc.json
.html-minifier.conf
.htmlhintrc
.phpcs.xml
.phpmd.xml
.stylelintrc.json
.dbwebb/
.dbwebb/cli.version
.dbwebb/course
.dbwebb/inspect
.dbwebb/lab.version
.dbwebb/upload.exclude
.dbwebb/upload.include
.dbwebb/validate.exclude
.dbwebb/inspect-src/
.dbwebb/script/
.dbwebb/web/
sent 1,262 bytes received 594 bytes 3,712.00 bytes/sec
total size is 18,855 speedup is 10.16
-----------------------------------------
DONE to init the www-directory structure on the server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment