Installation de Code Combat

Installation de Code Combat.
Distribution de travail : Ubuntu 14.04 LTS
1) Répertoire de travail :

[~] ➔ mkdir CODECOMBAT
[~] ➔ cd CODECOMBAT/
[~/CODECOMBAT] ➔

2) Installation du repository MongoDB :

[~/CODECOMBAT] ➔ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
[~/CODECOMBAT] ➔ echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | sudo tee /etc/apt/sources.list.d/mongodb.list
[~/CODECOMBAT] ➔ sudo apt-get update

3) Installation des dépendances

[~/CODECOMBAT] ➔ sudo apt-get install build-essential python2.7 git curl mongodb-org nodejs-legacy

4) Activer Python 2.7 :

[~/CODECOMBAT] ➔ npm config set python `which python2.7`

5) Forker le dépôt officiel Code Combat vers un compte Github :
Fork le dépôt officiel : https://github.com/codecombat/codecombat
6) Cloner le dépôt CodeCombat :

[~/CODECOMBAT] ➔ git clone https://github.com/Nekrofage/codecombat.git
Clonage dans 'codecombat'...
remote: Counting objects: 83081, done.
remote: Compressing objects: 100% (138/138), done.
remote: Total 83081 (delta 68), reused 0 (delta 0), pack-reused 82942
Réception d'objets: 100% (83081/83081), 83.32 MiB | 1.17 MiB/s, done.
Résolution des deltas: 100% (64559/64559), done.
Vérification de la connectivité... fait.
[~/CODECOMBAT] ➔ cd codecombat
[~/CODECOMBAT/codecombat] ➔ git remote add -f upstream https://github.com/codecombat/codecombat.git
Mise à jour de upstream
Depuis https://github.com/codecombat/codecombat
 * [nouvelle branche] course-correction -> upstream/course-correction
 * [nouvelle branche] docker     -> upstream/docker
 * [nouvelle branche] master     -> upstream/master
 * [nouvelle branche] prepaid-v2 -> upstream/prepaid-v2
 * [nouvelle branche] production -> upstream/production
 * [nouvelle branche] soffes/ipad -> upstream/soffes/ipad
 * [nouvelle branche] travis-test -> upstream/travis-test

7) Installation de Npm :

[~/CODECOMBAT/codecombat] ➔ npm install
npm WARN deprecated node-force-domain@0.1.0: Use forcedomain instead.
npm WARN engine telepath-brunch@0.0.1: wanted: {"node":"~0.10.0"} (current: {"node":"0.12.0","npm":"2.5.1"})
 ...
 sass-brunch@1.9.1 node_modules/sass-brunch
├── promise@6.1.0 (asap@1.0.0)
├── progeny@0.5.2 (async-each@0.1.6, fs-mode@1.0.1)
└── node-sass@3.4.1 (get-stdin@4.0.1, async-foreach@0.1.3, chalk@1.1.1, mkdirp@0.5.1, glob@5.0.15, npmconf@2.1.2, nan@2.1.0, meow@3.5.0, gaze@0.5.2, request@2.65.0, sass-graph@2.0.1, node-gyp@3.0.3, cross-spawn@2.0.0)

8) Initialiser la base de données MongoDB :

[~/CODECOMBAT/codecombat] ➔ (cd $(mktemp -d /tmp/coco.XXXXXXXX) && curl http://analytics.codecombat.com:8080/dump.tar.gz | tar xzf - && mongorestore --drop --host 127.0.0.1)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 91.3M  100 91.3M    0     0  1201k      0  0:01:17  0:01:17 --:--:-- 1189k
...
2015-11-03T20:23:25.176+0100 	Creating index: { unique: true, key: { slug: 1 }, name: "slug index", ns: "coco.levels", sparse: true }
2015-11-03T20:23:25.177+0100 	Creating index: { key: { index: 1, _fts: "text", _ftsx: 1 }, name: "search index", ns: "coco.levels", sparse: true, language_override: "searchLanguage", background: true, safe: null, weights: { description: 1, name: 1 }, default_language: "english", textIndexVersion: 2 }

9) Lancer le serveur MongoDB :

[~/CODECOMBAT/codecombat] ➔ sudo service mongod start
[sudo] password for util01:
start: Job is already running: mongod
[~/CODECOMBAT/codecombat] ➔ sudo service mongod restart
mongod stop/waiting
mongod start/running, process 9362

10) Lancer CodeCombat :

[[~/CODECOMBAT/codecombat] ➔ npm start
> codecombat@ start /home/util01/CODECOMBAT/codecombat
> node ./index.js
SENDWITHUS: Debug enabled
2015-11-03T19:31:35.991Z - info: Connecting to Mongo with connection string mongodb://localhost:27017/coco
2015-11-03T19:31:36.259Z - debug: route module routes/admin setup
2015-11-03T19:31:36.260Z - debug: route module routes/auth setup
2015-11-03T19:31:36.302Z - debug: route module routes/contact setup
2015-11-03T19:31:36.340Z - debug: route module routes/db setup
...
GET /file/db/thang.type/5422f63718adb78d98d265f7/spike_wall_attack_2.mp3 200 18ms
GET /file/db/thang.type/5422f63718adb78d98d265f7/spike_wall_attack_1.mp3 200 24ms
GET /file/db/thang.type/5422f63718adb78d98d265f7/spike_wall_attack_4.mp3 200 4ms
GET /file/db/thang.type/5422f63718adb78d98d265f7/spike_wall_attack_5.mp3 200 5ms
GET /file/interface/level_loaded.mp3 404 3ms
GET /db/user/56390a242deb15bd249ecfcd/achievements?notified=false&_=1446579193013 200 16ms

11) Site CodeCombat :
http://localhost:3000
codecombat
12) Liens :
https://codecombat.com/
https://github.com/codecombat/codecombat/wiki/Dev-Setup:-Linux#ubuntu-installation

Comments are closed, but trackbacks and pingbacks are open.