Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy issue with /admin 404 #351

Closed
mzupan opened this issue Apr 10, 2017 · 2 comments
Closed

Deploy issue with /admin 404 #351

mzupan opened this issue Apr 10, 2017 · 2 comments
Milestone

Comments

@mzupan
Copy link

mzupan commented Apr 10, 2017

So I have a deb install on Ubuntu 16.04 and trying to deploy some template changes over the package install using cap.

I'm getting two errors..

One is

$ cap production deploy
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as api-umbrella-deploy@10.115.2.234: cmake exit status: 1
cmake stdout: -- Configuring incomplete, errors occurred!
See also "/opt/api-umbrella/embedded/apps/core/shared/deploy-build/CMakeFiles/CMakeOutput.log".
cmake stderr: CMake Error at /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2126 (get_property):
  get_property could not find TARGET luarocks.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2462 (_ep_add_configure_command)
  /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/cmake/core-lua-deps.cmake:18 (ExternalProject_Add)
  CMakeLists.txt:34 (include)


CMake Error at /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2126 (get_property):
  get_property could not find TARGET luarocks.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2462 (_ep_add_configure_command)
  /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/cmake/core-lua-deps.cmake:28 (ExternalProject_Add)
  CMakeLists.txt:34 (include)


CMake Error at /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2126 (get_property):
  get_property could not find TARGET luarocks.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2462 (_ep_add_configure_command)
  /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/cmake/core-lua-deps.cmake:38 (ExternalProject_Add)
  CMakeLists.txt:34 (include)

SSHKit::Command::Failed: cmake exit status: 1
cmake stdout: -- Configuring incomplete, errors occurred!
See also "/opt/api-umbrella/embedded/apps/core/shared/deploy-build/CMakeFiles/CMakeOutput.log".
cmake stderr: CMake Error at /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2126 (get_property):
  get_property could not find TARGET luarocks.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2462 (_ep_add_configure_command)
  /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/cmake/core-lua-deps.cmake:18 (ExternalProject_Add)
  CMakeLists.txt:34 (include)


CMake Error at /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2126 (get_property):
  get_property could not find TARGET luarocks.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2462 (_ep_add_configure_command)
  /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/cmake/core-lua-deps.cmake:28 (ExternalProject_Add)
  CMakeLists.txt:34 (include)


CMake Error at /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2126 (get_property):
  get_property could not find TARGET luarocks.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2462 (_ep_add_configure_command)
  /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/cmake/core-lua-deps.cmake:38 (ExternalProject_Add)
  CMakeLists.txt:34 (include)

Tasks: TOP => deploy:updated => deploy:lua_deps
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as api-umbrella-deploy@10.115.2.234: cmake exit status: 1
cmake stdout: -- Configuring incomplete, errors occurred!
See also "/opt/api-umbrella/embedded/apps/core/shared/deploy-build/CMakeFiles/CMakeOutput.log".
cmake stderr: CMake Error at /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2126 (get_property):
  get_property could not find TARGET luarocks.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2462 (_ep_add_configure_command)
  /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/cmake/core-lua-deps.cmake:18 (ExternalProject_Add)
  CMakeLists.txt:34 (include)


CMake Error at /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2126 (get_property):
  get_property could not find TARGET luarocks.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2462 (_ep_add_configure_command)
  /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/cmake/core-lua-deps.cmake:28 (ExternalProject_Add)
  CMakeLists.txt:34 (include)


CMake Error at /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2126 (get_property):
  get_property could not find TARGET luarocks.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/ExternalProject.cmake:2462 (_ep_add_configure_command)
  /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/cmake/core-lua-deps.cmake:38 (ExternalProject_Add)
  CMakeLists.txt:34 (include)
  INFO [ca13e881] Running /usr/bin/env mkdir -p /tmp/api-umbrella/ as api-umbrella-deploy@10.115.2.234
  INFO [ca13e881] Finished in 0.224 seconds with exit status 0 (successful).
  INFO Uploading /tmp/api-umbrella/git-ssh.sh 100.0%
  INFO [0a1dabe6] Running /usr/bin/env chmod +x /tmp/api-umbrella/git-ssh.sh as api-umbrella-deploy@10.115.2.234
  INFO [0a1dabe6] Finished in 0.004 seconds with exit status 0 (successful).
  INFO [f7a13e3c] Running /usr/bin/env git ls-remote --heads https://github.com/NREL/api-umbrella.git as api-umbrella-deploy@10.115.2.234
  INFO [f7a13e3c] Finished in 0.186 seconds with exit status 0 (successful).
  INFO [c0a09718] Running /usr/bin/env mkdir -p /opt/api-umbrella/embedded/apps/core/shared /opt/api-umbrella/embedded/apps/core/releases as api-umbrella-deploy@10.115.2.234
  INFO [c0a09718] Finished in 0.005 seconds with exit status 0 (successful).
  INFO [8b83ad30] Running /usr/bin/env mkdir -p /opt/api-umbrella/embedded/apps/core/shared/build/work /opt/api-umbrella/embedded/apps/core/shared/src/api-umbrella/web-app/public/web-assets /opt/api-umbrella/embedded/apps/core/shared/vendor as api-umbrella-deploy@10.115.2.234
  INFO [8b83ad30] Finished in 0.004 seconds with exit status 0 (successful).
  INFO The repository mirror is at /opt/api-umbrella/embedded/apps/core/repo
  INFO [40fd4df6] Running /usr/bin/env git remote update as api-umbrella-deploy@10.115.2.234
  INFO [40fd4df6] Finished in 0.186 seconds with exit status 0 (successful).
  INFO [20022164] Running /usr/bin/env mkdir -p /opt/api-umbrella/embedded/apps/core/releases/20170410162835 as api-umbrella-deploy@10.115.2.234
  INFO [20022164] Finished in 0.006 seconds with exit status 0 (successful).
  INFO [c4966dc4] Running /usr/bin/env git archive master | tar -x -f - -C /opt/api-umbrella/embedded/apps/core/releases/20170410162835 as api-umbrella-deploy@10.115.2.234
  INFO [c4966dc4] Finished in 0.063 seconds with exit status 0 (successful).
  INFO [aae02eef] Running /usr/bin/env echo "fdbd00f" >> REVISION as api-umbrella-deploy@10.115.2.234
  INFO [aae02eef] Finished in 0.004 seconds with exit status 0 (successful).
  INFO [abcb3b36] Running /usr/bin/env mkdir -p /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build /opt/api-umbrella/embedded/apps/core/releases/20170410162835/src/api-umbrella/web-app/public /opt/api-umbrella/embedded/apps/core/releases/20170410162835 as api-umbrella-deploy@10.115.2.234
  INFO [abcb3b36] Finished in 0.004 seconds with exit status 0 (successful).
  INFO [f93f858d] Running /usr/bin/env ln -s /opt/api-umbrella/embedded/apps/core/shared/build/work /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/work as api-umbrella-deploy@10.115.2.234
  INFO [f93f858d] Finished in 0.004 seconds with exit status 0 (successful).
  INFO [e5371663] Running /usr/bin/env ln -s /opt/api-umbrella/embedded/apps/core/shared/src/api-umbrella/web-app/public/web-assets /opt/api-umbrella/embedded/apps/core/releases/20170410162835/src/api-umbrella/web-app/public/web-assets as api-umbrella-deploy@10.115.2.234
  INFO [e5371663] Finished in 0.004 seconds with exit status 0 (successful).
  INFO [c31d7042] Running /usr/bin/env ln -s /opt/api-umbrella/embedded/apps/core/shared/vendor /opt/api-umbrella/embedded/apps/core/releases/20170410162835/vendor as api-umbrella-deploy@10.115.2.234
  INFO [c31d7042] Finished in 0.004 seconds with exit status 0 (successful).
  INFO [ea1259f3] Running /usr/bin/env bundle install --gemfile=/opt/api-umbrella/embedded/apps/core/releases/20170410162835/src/api-umbrella/web-app/Gemfile --path=/opt/api-umbrella/embedded/apps/core/shared/vendor/bundle --without="development test" --deployment --clean as api-umbrella-deploy@10.115.2.234
  INFO [ea1259f3] Finished in 2.503 seconds with exit status 0 (successful).
  INFO [5039b95c] Running /usr/bin/env mkdir -p /opt/api-umbrella/embedded/apps/core/shared/deploy-build as api-umbrella-deploy@10.115.2.234
  INFO [5039b95c] Finished in 0.005 seconds with exit status 0 (successful).
  INFO [50e700f0] Running /usr/bin/env rm -f /opt/api-umbrella/embedded/apps/core/shared/deploy-build/CMakeCache.txt as api-umbrella-deploy@10.115.2.234
  INFO [50e700f0] Finished in 0.004 seconds with exit status 0 (successful).
  INFO [ebf7b3be] Running /usr/bin/env cmake /opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/cmake/deploy as api-umbrella-deploy@10.115.2.234
ERROR: Job failed: exit status 1

The other when I comment out of the lua stuff in the deploy script I'm getting 404s on the nginx side.

017-04-10T08:17:51.34107 2017/04/10 08:17:51 [error] 29957#0: *13253217 "/opt/api-umbrella/embedded/apps/core/current/build/dist/admin-ui/index.html" is not found (2: No such file or directory), client: 10.115.3.199, server: _, request: "GET /admin/ HTTP/1.1", host: "api.domain.com"
root@ip-10-115-2-234:/opt/api-umbrella/var/log/nginx# ls /opt/api-umbrella/embedded/apps/core/current/build
cmake  mora  package  package_dependencies.sh  scripts  work

I don't see a dist dir there.

I have luarocks install

root@ip-10-115-2-234:/opt/api-umbrella/embedded/apps/core/releases/20170410162835/build/cmake/deploy# dpkg -l luarocks
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                        Version            Architecture       Description
+++-===========================-==================-==================-============================================================
ii  luarocks                    2.2.0+dfsg-2       all                deployment and management system for Lua modules
@GUI
Copy link
Member

GUI commented May 11, 2017

@mzupan: Sorry for the belated response. Unfortunately, it's been a while since I've done a capistrano deploy on top of the package installation, so it's possible some bugs have cropped up with those default deployment scripts. This should be solvable, though, so I'll try to take a look at this sometime in the next week.

In the meantime you could manually edit the files on the server, but I realize that's not really ideal.

Out of curiosity, though, what type of template changes were you looking to make to the codebase? Ideally you shouldn't really need to deploy custom code for some simple tweaks, so if there's something custom you're trying to achieve in the templates that you think other people might run into as well, we could see about making it an option within our default templates.

GUI added a commit that referenced this issue Jun 16, 2017
Capistrano-based deploys (to overlay changes from master on top of an
existing package installation) had become broken somewhere along the way
to the v0.14 release. This fixes the deployments by refactoring the
deployments to leverage more of the normal build process, so our
existing build process for gems/lua/admin-ui can be reused.

#351
@GUI GUI added this to the v0.14.3 milestone Jul 13, 2017
@GUI
Copy link
Member

GUI commented Jul 13, 2017

If you're still interested, this should be fixed in master as of e7c870c. The instructions at https://api-umbrella.readthedocs.io/en/latest/developer/deploying.html should be up to date. Let us know if you're still seeing any issues.

@GUI GUI closed this as completed Jul 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants