Description:
added more instructions for installer
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r90:c62b55de9ac7 - - 1 file changed: 2 inserted, 1 deleted

@@ -40,102 +40,103
40 40 echo "1. Run mysql:"
41 41 echo
42 42 echo " mysql -u root -p"
43 43 echo
44 44 echo " if you have just installed mysql, the root password is the one that you have just entered"
45 45 echo "2. Create a new database, a new user, and grant access to grader database:"
46 46 echo
47 47 echo " create user 'USERNAME'@'localhost' identified by 'PASSWORD';"
48 48 echo " create database DATABASENEME;"
49 49 echo " grant all on DATABASENAME.* to 'USERNAME'@'localhost';"
50 50 echo
51 51 echo " Replace USERNAME, PASSWORD, and DATABASENAME accordingly."
52 52 echo
53 53 echo "Hit enter when ready..."
54 54 read dummy
55 55 fi
56 56
57 57 CAFE_PATH=`pwd`
58 58
59 59 cd web
60 60
61 61 echo "Please provide grader database:"
62 62 read database
63 63
64 64 echo "Please provide grader username:"
65 65 read username
66 66
67 67 echo "Please provide $username password:"
68 68 read password
69 69
70 70 echo "development:" > config/database.yml
71 71 echo " adapter: mysql" >> config/database.yml
72 72 echo " database: $database" >> config/database.yml
73 73 echo " username: $username" >> config/database.yml
74 74 echo " password: $password" >> config/database.yml
75 75 echo " host: localhost" >> config/database.yml
76 76 echo "" >> config/database.yml
77 77 echo "production:" >> config/database.yml
78 78 echo " adapter: mysql" >> config/database.yml
79 79 echo " database: $database" >> config/database.yml
80 80 echo " username: $username" >> config/database.yml
81 81 echo " password: $password" >> config/database.yml
82 82 echo " host: localhost" >> config/database.yml
83 83
84 84 echo "Object.instance_eval{remove_const :GRADER_ROOT_DIR}" >> config/environment.rb
85 85 echo "Object.instance_eval{remove_const :GRADING_RESULT_DIR}" >> config/environment.rb
86 86 echo "GRADER_ROOT_DIR = '$CAFE_PATH/judge'" >> config/environment.rb
87 87 echo "GRADING_RESULT_DIR = '$CAFE_PATH/judge/result'" >> config/environment.rb
88 88
89 89 echo "Installing required gems"
90 90
91 91 sudo rake gems:install
92 92 # to remove log file owned by root
93 93 sudo rm log/*
94 94 sudo rmdir log
95 95
96 96 echo "Running rake tasks to initialize database"
97 97
98 98 rake db:migrate
99 99 rake db:seed
100 100
101 101 echo "Intalling web interface complete..."
102 102 echo
103 103 echo "Fetching grader"
104 104
105 105 cd ..
106 106
107 107 mkdir judge
108 108 cd judge
109 109 git clone http://git.gitorious.org/cafe-grader/cafe-grader-judge-scripts.git scripts
110 110 mkdir raw
111 111 mkdir ev-exam
112 112 mkdir ev
113 113 mkdir result
114 114 mkdir log
115 115
116 116 echo "Configuring grader"
117 117
118 118 cp scripts/config/env_exam.rb.SAMPLE scripts/config/env_exam.rb
119 119 cp scripts/config/env_grading.rb.SAMPLE scripts/config/env_grading.rb
120 120
121 121 # create new environment.rb file
122 122 echo "RAILS_ROOT = '$CAFE_PATH/web'" > scripts/config/environment.rb
123 123 echo "GRADER_ROOT = '$CAFE_PATH/judge/scripts'" >> scripts/config/environment.rb
124 124 echo "require File.join(File.dirname(__FILE__),'../lib/boot')" >> scripts/config/environment.rb
125 125 echo "require File.dirname(__FILE__) + \"/env_#{GRADER_ENV}.rb\"" >> scripts/config/environment.rb
126 126
127 127 cd ..
128 128
129 129 echo "Installing web server mongrel"
130 130
131 131 sudo gem install mongrel --no-ri --no-rdoc
132 132
133 133 echo "Now you are ready to run cafe grader...."
134 134 echo
135 135 echo "Try:"
136 + echo
136 137 echo " cd web"
137 138 echo " ./script/server"
138 139 echo
139 140 echo "and access web at http://localhost:3000/"
141 + echo "The root username is 'root', its password is 'ioionrails'."
140 142
141 -
You need to be logged in to leave comments. Login now