DOI-ONRR / nrrd

ONRR open data site hosted on cloud.gov
Other
13 stars 5 forks source link

Restage applications #2932

Closed Maroyafaied closed 11 months ago

Maroyafaied commented 11 months ago

You can restage your applications by opening the command line and entering the following commands:

cf target -o doi-onrr -s dev ; cf restage --strategy rolling dev-onrr-cms

cf target -o doi-onrr -s prod ; cf restage --strategy rolling prod-onrr-cms

cf target -o doi-onrr -s prod ; cf restage --strategy rolling ssh-app

greensomes commented 11 months ago

Attempting to restage the cms applications results in an error:

cf target -o doi-onrr -s prod ; cf restage --strategy rolling prod-onrr-cms

API endpoint:   https://api.fr.cloud.gov
API version:    3.149.0
user:           Jeffrey.Schwartz@onrr.gov
org:            doi-onrr
space:          prod

Restaging app prod-onrr-cms in org doi-onrr / space prod as Jeffrey.Schwartz@onrr.gov...

Staging app and tracing logs...
   Downloading nodejs_buildpack...
   Downloaded nodejs_buildpack
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 creating container for instance a5241529-7f83-4643-8b6c-287c9a8a084e
   Security group rules were updated
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 successfully created container for instance a5241529-7f83-4643-8b6c-287c9a8a084e
   Downloading app package...
   Downloading build artifacts cache...
   Downloaded app package (433.6K)
   Downloaded build artifacts cache (180.6M)
   -----> Nodejs Buildpack version 1.8.18
   **WARNING** buildpack version changed from 1.8.14 to 1.8.18
   -----> Bootstrapping python
   -----> Installing python 3.11.6
   Download [https://buildpacks.cloudfoundry.org/dependencies/python/python_3.11.6_linux_x64_cflinuxfs4_9aa19c6d.tgz]
   -----> Installing binaries
   engines.node (package.json): 16.x
   engines.npm (package.json): 8.x
   **ERROR** Unable to install node: no match found for 16.x in [18.18.0 18.18.2 20.8.0 20.8.1]
   Failed to compile droplet: Failed to run all supply scripts: exit status 14
   Exit status 223
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 stopping instance a5241529-7f83-4643-8b6c-287c9a8a084e
   Cell c51e9a40-dff6-400a-b1b0-c88318aae8f2 destroying container for instance a5241529-7f83-4643-8b6c-287c9a8a084e
Error staging application: BuildpackCompileFailed - App staging failed in the buildpack compile phase
FAILED
greensomes commented 11 months ago

The above error appears to be due to an unsupported version of nodejs. We may need to update the docker image we use from 16.13 to at least 18.18. I've also observed that the package.json file for the cms references version 16.x of node. Removing this reference may be all we need to do to resolve this. Some additional investigation and tinkering is needed.

greensomes commented 11 months ago

I changed the CMS package.json file on the dev branch to update the engines properties. Because the application is prebuilt in CircleCI on an older version of node (12.13), there is no issue with this change. The restage of the CMS in dev was successful.