Developing on production environment

164 views
Skip to first unread message

wongalv...@gmail.com

unread,
May 13, 2016, 11:17:52 AM5/13/16
to taigaio
I am hosting Taiga on an Azure VM intended for development, but to have the server configurations done smoothly I used taiga-scripts and installed production environment, and planning to switch to master branch afterwards. As I am trying to make a custom theme, I noticed that there is no app/ folder in taiga-front cloned by taiga-scripts. (I assume this is a part of the production environment configuration in taiga-scripts?)

I would like to know how can I switch it to development environment while keeping the server working, i.e. I can test the website by visiting the site from my browser?

David Barragán

unread,
May 17, 2016, 9:35:05 AM5/17/16
to Alvis Wong, taigaio
Hi Alvis, 

taiga-script use taiga-front-dist, the compiled version of taiga-front, so you need to install taiga-front instead of taiga-front-dist.



Regards

On Fri, May 13, 2016 at 5:17 PM, <wongalv...@gmail.com> wrote:
I am hosting Taiga on an Azure VM intended for development, but to have the server configurations done smoothly I used taiga-scripts and installed production environment, and planning to switch to master branch afterwards. As I am trying to make a custom theme, I noticed that there is no app/ folder in taiga-front cloned by taiga-scripts. (I assume this is a part of the production environment configuration in taiga-scripts?)

I would like to know how can I switch it to development environment while keeping the server working, i.e. I can test the website by visiting the site from my browser?

--
Please help us keep the Taiga.io Community open and inclusive, follow our Code of Conduct:
https://github.com/taigaio/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
---
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To post to this group, send email to tai...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/taigaio/43514d44-c611-4b58-a64f-ffa20446e1e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

---

 
David Barragán Merino  
Engineer

www.kaleidos.net/FFF8E7

wongalv...@gmail.com

unread,
May 17, 2016, 12:03:19 PM5/17/16
to taigaio, wongalv...@gmail.com
Hi,

Thanks for your reply. I used taiga-scripts (production environment) because the sites could be served by the VM so that I could see the results with my browser, before if I did the development environment setup it appears that the sites are not served properly. If I clone the taiga-front repo then will it work properly with the sites being served, while I can develop on it?

Regards

David Barragán於 2016年5月17日星期二 UTC+8下午9時35分05秒寫道:

David Barragán

unread,
May 17, 2016, 12:23:15 PM5/17/16
to Alvis Wong, taigaio
We use taiga-front in taiga.io and not taiga-front-dist. The advantage of using taiga-front-dist is that you don't need to setup all the front dependencies. 

So the answer is yes.

To develop taiga we use taiga-back and taiga-front in our laptops. 


For more options, visit https://groups.google.com/d/optout.

wongalv...@gmail.com

unread,
May 17, 2016, 1:16:19 PM5/17/16
to taigaio, wongalv...@gmail.com
Strange... I deleted the old taiga-back/front repos (by renaming them), then ran bash setup-devel.sh  and the taiga-front cloned is only having dist/, none of the other folders including app/

David Barragán於 2016年5月18日星期三 UTC+8上午12時23分15秒寫道:

wongalv...@gmail.com

unread,
May 17, 2016, 1:57:59 PM5/17/16
to taigaio, wongalv...@gmail.com
And if nginx wouldn't be installed with the development environment, how can the site be served so that I could test them remotely?

David Barragán於 2016年5月18日星期三 UTC+8上午12時23分15秒寫道:

David Barragán

unread,
May 17, 2016, 2:28:32 PM5/17/16
to Alvis Wong, taigaio
- setup-devel.sh doesn't setup the dev env so you have to install taiga-front by yourselves.
- you don't need to reinstall taiga-back, 
- you only need to install taiga-front and change the nginx configuration to publish taiga-front/dist/ instead of taiga-front-dist/dist.
- when you make some change in taiga-front you have to recompile (gulp deploy && gulp compile-themes) and reload the web page in the browser to see the new change


For more options, visit https://groups.google.com/d/optout.

wongalv...@gmail.com

unread,
May 17, 2016, 9:47:30 PM5/17/16
to taigaio, wongalv...@gmail.com
Thanks, let me try that out.

David Barragán於 2016年5月18日星期三 UTC+8上午2時28分32秒寫道:

wongalv...@gmail.com

unread,
May 18, 2016, 2:25:01 AM5/18/16
to taigaio, wongalv...@gmail.com
When I try to visit http://13.84.154.69:8000/api/v1/ I always get an error "refused to connect" , access to 8000 port is allowed.
Here's what I get when running runserver
Trying import local.py settings...
Trying import local.py settings...
Performing system checks...
 
System check identified no issues (0 silenced).
May 18, 2016 - 06:19:56
Django version 1.9.2, using settings 'settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
orming system checks...
 
 
 
System check identified no issues (0 silenced).
 
May 18, 2016 - 06:19:56
 
Django version 1.9.2, using settings 'settings'
 
Starting development server at http://127.0.0.1:8000/
 

David Barragán於 2016年5月18日星期三 UTC+8上午2時28分32秒寫道:

wongalv...@gmail.com

unread,
May 18, 2016, 3:55:55 AM5/18/16
to taigaio, wongalv...@gmail.com
If I run curl http://localhost:8000/api/v1/ I get the json
but if I run curl http://localhost:8000/api/v1/
curl: (7) Failed to connect to localhost port 8000: Connection refused

David Barragán於 2016年5月18日星期三 UTC+8上午2時28分32秒寫道:

David Barragán

unread,
May 18, 2016, 4:03:32 AM5/18/16
to Alvis Wong, taigaio
curl http://localhost:8000/api/v1/

Are the same urls, sorry but I can't understand. 


For more options, visit https://groups.google.com/d/optout.

wongalv...@gmail.com

unread,
May 18, 2016, 4:39:13 AM5/18/16
to taigaio, wongalv...@gmail.com
I mean curl http://13.84.154.69:8000/api/v1/

David Barragán於 2016年5月18日星期三 UTC+8下午4時03分32秒寫道:

David Barragán

unread,
May 18, 2016, 4:56:53 AM5/18/16
to Alvis Wong, taigaio
yes, this happens because you are running taiga-back in local mode. If you only want to create a theme you only works over taiga-front so you can run taiga-back with circus instead of with the dev server. 

But if you want to use the dev server add 0.0.0.0:8000 to the command

> ./manage.py runserver --help
Trying import local.py settings...
usage: manage.py runserver [-h] [--version] [-v {0,1,2,3}]
                          [--settings SETTINGS] [--pythonpath PYTHONPATH]
                          [--traceback] [--no-color] [--ipv6] [--nothreading]
                          [--noreload]
                          [addrport]


> ./manage.py runserver 0.0.0.0:8000
Trying import local.py settings...
Trying import local.py settings...
Performing system checks...

System check identified no issues (0 silenced).
May 18, 2016 - 08:53:58
Django version 1.9.2, using settings 'settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

For more options, visit https://groups.google.com/d/optout.

wongalv...@gmail.com

unread,
May 18, 2016, 8:43:54 AM5/18/16
to taigaio, wongalv...@gmail.com
The backend is working now, as I'm installing the frontend, when I run gulp I get 

Unhandled rejection Error in plugin 'gulp-cache'
Message:
    Error code 1
[object Object]

I've got scss-lint, the gem, npm and bower stuff installed, I've tried several times but I'm still getting this.


David Barragán於 2016年5月18日星期三 UTC+8下午4時56分53秒寫道:

David Barragán

unread,
May 18, 2016, 9:15:32 AM5/18/16
to Alvis Wong, taigaio
what version of node are you using?

try to install gulp-cache again


For more options, visit https://groups.google.com/d/optout.

wongalv...@gmail.com

unread,
May 18, 2016, 9:19:32 AM5/18/16
to taigaio, wongalv...@gmail.com
v0.10.25

and the problem still persists

David Barragán於 2016年5月18日星期三 UTC+8下午9時15分32秒寫道:

David Barragán

unread,
May 18, 2016, 9:46:53 AM5/18/16
to Alvis Wong, taigaio
you are using a very old version, try to use some 5.* or the last one, v5.11.1.

nvm (https://github.com/creationix/nvm) is a good app to manage different node versions 


For more options, visit https://groups.google.com/d/optout.

wongalv...@gmail.com

unread,
May 18, 2016, 10:21:16 AM5/18/16
to taigaio, wongalv...@gmail.com
I've updated npm (only to v3, idk why it's only up to v3)

and this is what I get after npm install and
:~/taiga-front$ sudo npm install gulp-cache                                                                                                                                                            
loadExtraneous -> request - |############################################################################################---------------------------------------------------------------------------|
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.

David Barragán於 2016年5月18日星期三 UTC+8下午9時46分53秒寫道:

David Barragán

unread,
May 18, 2016, 10:44:57 AM5/18/16
to Alvis Wong, taigaio
Sorry but I don't now why you have this error. I use this versions

> node --version 
v5.11.0
> npm --version
3.8.6

and why are you using sudo? you should install with the taiga user so that does not affect the entire system.


For more options, visit https://groups.google.com/d/optout.

wongalv...@gmail.com

unread,
May 18, 2016, 10:59:00 AM5/18/16
to taigaio, wongalv...@gmail.com
You mean using virtualenv?

David Barragán於 2016年5月18日星期三 UTC+8下午10時44分57秒寫道:

wongalv...@gmail.com

unread,
May 18, 2016, 11:09:03 AM5/18/16
to taigaio, wongalv...@gmail.com
I'm now having node v5.11.1 (npm v3.8.6) 
w And I get ~/taiga-front$ sudo npm install
fetchMetadata -> 304      - |######################################################-----------------------------------------------------------------------------------------------------------------|
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
......
......
 
util.js:35
  var str = String(f).replace(formatRegExp, function(x) {
                      ^
RangeError: Maximum call stack size exceeded
It seems to be a problem with the code but my taiga-front is in stable branch and has nothing changed

David Barragán於 2016年5月18日星期三 UTC+8下午10時44分57秒寫道:

Xavi Julián

unread,
May 18, 2016, 11:12:49 AM5/18/16
to Alvis Wong, taigaio
Ok lets try this:

In your taiga-front folder, remove the folder node_modules 
Launch npm install (without sudo)

Does it works?


For more options, visit https://groups.google.com/d/optout.



--
  
Xavier Julián Olmos 
xavier...@kaleidos.net | Tel: (+34) 913562995                    
www.kaleidos.net

wongalv...@gmail.com

unread,
May 18, 2016, 11:28:31 AM5/18/16
to taigaio, wongalv...@gmail.com
Yes, and 
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:                                                                                                                             
npm WARN notsup Not compatible with your operating system or architecture: fsev...@1.0.12       
and ~/taiga-front$ gulp
[15:23:23] Using gulpfile ~/taiga-front/gulpfile.js
[15:23:23] Starting 'default'...
[15:23:23] Starting 'delete-old-version'...
[15:23:23] 'delete-old-versionerrored after 12 ms
[15:23:23] Error: ENOTEMPTY: directory not empty, rmdir '/home/pwmvx1289/taiga-front/dist/v-1463580617316'
  at Error (native)
so that's why I've been running sudo gulp, since the first time I've tried to remove node_modules and npm install again
if I do sudo gulp, the same problem persists
 sudo gulp                                                                                                                                                             
[15:24:33] Using gulpfile ~/taiga-front/gulpfile.js
[15:24:33] Starting 'default'...
[15:24:33] Starting 'delete-old-version'...
[15:24:33] Finished 'delete-old-version' after 57 ms
[15:24:33] Starting 'delete-tmp'...
[15:24:33] Finished 'delete-tmp' after 86 ms
[15:24:33] Starting 'copy-fonts'...
[15:24:33] Starting 'copy-theme-fonts'...
[15:24:33] Starting 'copy-images'...
[15:24:33] Starting 'copy-theme-images'...
[15:24:33] Starting 'copy-svg'...
[15:24:33] Starting 'copy-theme-svg'...
[15:24:33] Starting 'copy-extras'...
[15:24:33] Starting 'styles'...
[15:24:33] Starting 'scss-lint'...
[15:24:33] Starting 'coffee'...
[15:24:34] Starting 'conf'...
[15:24:34] Starting 'locales'...
[15:24:34] Starting 'moment-locales'...
[15:24:34] Starting 'app-loader'...
[15:24:34] Starting 'jslibs-watch'...
[15:24:34] Starting 'jade-deploy'...
[15:24:34] Starting 'jade'...
[15:24:34] Starting 'express'...
[15:24:34] Finished 'express' after 206 ms
[15:24:34] Starting 'watch'...
[15:24:36] Finished 'watch' after 1.84 s
[15:24:36] Finished 'copy-theme-fonts' after 2.17 s
[15:24:36] Finished 'copy-theme-images' after 2.16 s
[15:24:36] Finished 'copy-theme-svg' after 2.16 s
[15:24:36] Finished 'app-loader' after 2.98 s
[15:24:36] Finished 'copy-extras' after 3.02 s
[15:24:36] Finished 'conf' after 2.99 s
[15:24:39] Finished 'copy-fonts' after 5.05 s
[15:24:39] Finished 'copy-svg' after 5.22 s
[15:24:39] Finished 'locales' after 5.37 s
Unhandled rejection Error in plugin 'gulp-cache'
Message:
    Error code 1
[object Object]
[15:24:41] Finished 'copy-images' after 7.66 s
[15:24:41] Starting 'copy'...
[15:24:41] Finished 'copy' after 52 μs
[15:24:41] Finished 'jslibs-watch' after 7.61 s
[15:24:42] Finished 'moment-locales' after 8.44 s
[15:24:46] Finished 'jade' after 12 s
[15:24:46] Starting 'copy-index'...
[15:24:46] Finished 'copy-index' after 6.78 ms


Xavi Julián於 2016年5月18日星期三 UTC+8下午11時12分49秒寫道:

Xavi Julián

unread,
May 19, 2016, 2:03:39 AM5/19/16
to Alvis Wong, taigaio
I see 2 problems here, lets go with the first one: 

Delete folder permissions
I don't know much about Azure VM but seems related to an external limitation to delete a folder (v-1463580617316) not related to the Taiga process. Seems that your user (not sudo) has no permissions to delete this folder. Please, ensure that you have permissions to delete this folder from your machine without sudo. If you can, delete manually the dist folder and try again.

Now, if it works:

Cache problem
Try using gulp clear to clean your locales cache and try again.

Hope this works.



For more options, visit https://groups.google.com/d/optout.

wongalv...@gmail.com

unread,
May 19, 2016, 3:05:06 AM5/19/16
to taigaio, wongalv...@gmail.com
I removed the whole taiga-front and installed again, everything seems fine until


Xavi Julián於 2016年5月19日星期四 UTC+8下午2時03分39秒寫道:

wongalv...@gmail.com

unread,
May 19, 2016, 3:05:39 AM5/19/16
to taigaio, wongalv...@gmail.com
I removed the whole taiga-front and installed again, everything seems fine until 
~/taiga-front$ gulp
[06:17:15] Using gulpfile ~/taiga-front/gulpfile.js
[06:17:15] Starting 'default'...
[06:17:15] Starting 'delete-old-version'...
[06:17:15] Finished 'delete-old-version' after 101 ms
[06:17:15] Starting 'delete-tmp'...
[06:17:15] Finished 'delete-tmp' after 168 ms
[06:17:15] Starting 'copy-fonts'...
[06:17:15] Starting 'copy-theme-fonts'...
[06:17:15] Starting 'copy-images'...
[06:17:15] Starting 'copy-theme-images'...
[06:17:15] Starting 'copy-svg'...
[06:17:15] Starting 'copy-theme-svg'...
[06:17:15] Starting 'copy-extras'...
[06:17:15] Starting 'styles'...
[06:17:15] Starting 'scss-lint'...
[06:17:15] Starting 'coffee'...
[06:17:15] Starting 'conf'...
[06:17:15] Starting 'locales'...
[06:17:15] Starting 'moment-locales'...
[06:17:15] Starting 'app-loader'...
[06:17:15] Starting 'jslibs-watch'...
[06:17:16] Starting 'jade-deploy'...
[06:17:16] Starting 'jade'...
[06:17:16] Starting 'express'...
[06:17:16] Finished 'express' after 97 ms
[06:17:16] Starting 'watch'...
[06:17:17] Finished 'watch' after 1.39 s
[06:17:17] Finished 'copy-theme-fonts' after 1.64 s
[06:17:17] Finished 'copy-theme-images' after 1.64 s
[06:17:17] Finished 'copy-theme-svg' after 1.64 s
[06:17:18] Finished 'app-loader' after 2.79 s
[06:17:18] Finished 'copy-extras' after 2.85 s
[06:17:18] Finished 'conf' after 2.81 s
[06:17:20] Finished 'copy-fonts' after 4.94 s
[06:17:20] Finished 'copy-svg' after 5.04 s
[06:17:21] Finished 'locales' after 5.17 s
[06:17:21] Finished 'jslibs-watch' after 5.63 s
[06:17:23] Finished 'copy-images' after 7.56 s
[06:17:23] Starting 'copy'...
[06:17:23] Finished 'copy' after 10 μs
[06:17:24] Finished 'scss-lint' after 8.17 s
[06:17:24] Starting 'sass-compile'...
[06:17:25] Finished 'moment-locales' after 9.35 s
[06:17:29] Finished 'jade' after 14 s
[06:17:29] Starting 'copy-index'...
[06:17:29] Finished 'copy-index' after 17 ms
[06:17:29] Starting 'template-cache'...
[06:17:30] Finished 'coffee' after 14 s
[06:17:30] Starting 'app-watch'...
[06:17:30] Finished 'app-watch' after 12 μs
[06:17:30/home/pwmvx1289/taiga-front/dist/v-1463638635588/js/templates.js reloaded.
[06:17:30] Finished 'template-cache' after 775 ms
[06:17:30] Finished 'jade-deploy' after 15 s
[06:17:37] Finished 'sass-compile' after 14 s
[06:17:37] Starting 'css-lint-app'...
Unhandled rejection TypeError: Cannot read property 'success' of undefined
  at Object.gulp.src.pipe.cache.success (/home/pwmvx1289/taiga-front/gulpfile.js:293:39)
  at /home/pwmvx1289/taiga-front/node_modules/gulp-cache/lib/TaskProxy.js:121:52
  at tryCatcher (/home/pwmvx1289/taiga-front/node_modules/bluebird/js/release/util.js:16:23)
  at Promise._settlePromiseFromHandler (/home/pwmvx1289/taiga-front/node_modules/bluebird/js/release/promise.js:502:31)
  at Promise._settlePromise (/home/pwmvx1289/taiga-front/node_modules/bluebird/js/release/promise.js:559:18)
  at Promise._settlePromiseCtx (/home/pwmvx1289/taiga-front/node_modules/bluebird/js/release/promise.js:596:10)
  at Async._drainQueue (/home/pwmvx1289/taiga-front/node_modules/bluebird/js/release/async.js:143:12)
  at Async._drainQueues (/home/pwmvx1289/taiga-front/node_modules/bluebird/js/release/async.js:148:10)
  at Immediate.Async.drainQueues [as _onImmediate] (/home/pwmvx1289/taiga-front/node_modules/bluebird/js/release/async.js:17:14)
  at processImmediate [as _immediateCallback] (timers.js:383:17) 


Xavi Julián於 2016年5月19日星期四 UTC+8下午2時03分39秒寫道:
<div style="font-stretch:inherit;font-size:14px;line-height:14px;font-family:UbuntuMono,monospace;vertical-align:baseline;color:rgb(40,254,20)

Xavi Julián

unread,
May 19, 2016, 3:25:26 AM5/19/16
to Alvis Wong, taigaio
Great news!
Ok, that means is working fine so far. That's a bug related to our stable Taiga with the latest version of csslint (it fails when tries to compile empty files). We are currently working on it. :)
As a workaround while we fix it you can disable csslint temporarily from your gulpfile and the it will work again. It will be fixed and commited today.

Great!!

--
Please help us keep the Taiga.io Community open and inclusive, follow our Code of Conduct:
https://github.com/taigaio/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
---
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To post to this group, send email to tai...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

wongalv...@gmail.com

unread,
May 19, 2016, 4:34:07 AM5/19/16
to taigaio, wongalv...@gmail.com

Great! It finally worked! 

Thank you for all your help all along, I know you're all busy guys, I'm very thankful for you guys helping me to deal with these tedious issues.


Xavi Julián於 2016年5月19日星期四 UTC+8下午3時25分26秒寫道:
[06:17:30] Finished 'template-cache' after <span style="font-style:inherit;

Xavi Julián

unread,
May 19, 2016, 4:44:08 AM5/19/16
to Alvis Wong, taigaio
I am glad it finally worked! :D

--
Please help us keep the Taiga.io Community open and inclusive, follow our Code of Conduct:
https://github.com/taigaio/code-of-conduct/blob/master/CODE_OF_CONDUCT.md
---
You received this message because you are subscribed to the Google Groups "taigaio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taigaio+u...@googlegroups.com.
To post to this group, send email to tai...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages