Today OpenShift supports nodejs version 4, my application in on 6.9.4 LTS.
Is it possible to override default settings and install latest nodejs in OpenShift cartridge?
I am aware about this custom cartridge, my question is on how we could install latest nodejs?
As mentioned this docuentation about Marker" you can specify your NodeJS version by creating a file named NODEJS_VERSION and put your version you needed inside it.
Of course you have to clone it first via git on address specified on your Application setting (called "Source Code" on upper right corner).
git push it would trigger a build and deploy
Related
I am developing a platform-dependend node application and use Gitlab to build it for Windows, macOS and Linux.
Gitlab supports a image directive for its CI, but this uses docker, hence Linux. Another idea was to use nvm use, but this requires admin privilege.
What is the goto method to specify a node version in my .gitlab-ci.yml?
At my company, I can't get NuGetToolInstaller task to work in Azure Builds. I think it is having trouble getting out passed the proxy so I just don't use the task and rely on a cached version of NuGet.exe. However, the problem is the cached version is an older version NuGet 4.1.0 and I have no idea how to update it.
I was able to trick it by going to the location of the NuGet.exe file in the 4.1.0 folder and overwriting it with NuGet 5.5.1 version. Seems kludgy to me.
My question:
What's the correct way to update the NuGet.exe in cache used by the build agent folder?
Bonus:
I have proxy credentials, how do I make the NuGetToolInstaller work?
As a workaround , after downloading NuGet 5.5.1 to your local, you can set the local path of nuget.exe into your path environment variable (Copy the location of nuget.exe > Navigate to Control Panel > System > Advanced System Settings > Environment Variables). Then when using self-hosted agent , you can directly call nuget command through cmd task in azure devops.
My current platform version is: Node.js running on 64bit Amazon Linux/2.0.1
Which support following NodeJS versions: 0.12.6, 0.10.39, 0.10.38, 0.10.31, 0.8.28
I am looking a way to upgrade the NodeJS version: 4.x.x which seems to be available in platform version: Node.js running on 64bit Amazon Linux/3.1.0
but when I am upgrading it. it's says
How can I select the allowed version as it's not available.
Any Help,
Thanks,
P.S
1. Already tried via save / load configurations. Unable to find any option there.
2. Don't want to do setup it from the scratch for now.
First, ensure that you have tested the changes adequately before deploying to production. After that, you can:
Note the name of the Platform ARN/Solution Stack you want to upgrade to.
Perform eb init --region REGION_NAME and pick the application and environment you are working on
Perform eb config. This opens your environment's configuration in an editor. Change the value of the PlatformArn to the one you noted above in step 1.
Also in the editor, find the option setting aws:elasticbeanstalk:container:nodejs. Change the NodeVersion to 6.9.1 or one that the error message above suggests.
Save and quit.
After the configuration is complete:
Perform eb status to verify that your environment is using the upgraded Solution Stack.
You can clone the existing environment to a new one, using a different platform version.
In the Actions menu, select "Clone with the latest platform".
That opens a new page where you can select from available OS/nodejs versions.
Once you are satisfied with the new environment, you can swap URLs with the old one in order to replace it. After that, you can remove the older env.
This has happened a few times before when Amazon releases new Environments and they do not include versions in common between the environments. The solution is to set value for nodejs version to an empty string which means to use the latest version. It could break your app, but you can make a clone with latest platform and switch to desired version of nodejs later. So run this command to do that:
aws elasticbeanstalk update-environment --region "your region" --application-name "your app" --environment-name "your env" --option-settings "OptionName=NodeVersion,Namespace=aws:elasticbeanstalk:container:nodejs,Value=''"
I am trying to come up with a deployment strategy in developer environments using Ansible.
I have a few builds (node.js) coming out every day usually in the form of debian packages.
Eg: my_product_1.0.0_33.deb is the corresponding debian for build#33.
I am trying to automate the deployment on existing as well as new environments using Ansible. So what is the preferred way of updating the build packages using Ansible?
Eg: my_product_1.0.0_44.deb is my new build with build id #44 which I want to install on top of the existing build.
I am going through the Ansible documentation and below mentioned is the way I think will work for now.
Check if any package of "my_product" is installed and if not installed, install the latest debian.
If yes, check if the right build id of my_product is installed
If yes, don't restart the service and leave as is
If no, uninstall the existing package, install the new build debian and restart the service.
Is this the preferred approach of updating the debian packages in an environment or is there a better way to do this in Ansible?
The debian packages I receive are not hosted in any repository and are local .deb files.
Is this the preferred approach of updating the debian packages in an
environment or is there a better way to do this in Ansible?
This is a reasonably common approach. It could be simplified a bit by hosting your debs on an internal repo, but that's not necessary.
In general, you don't need to do things like "check if a package is installed and if not, install the latest version". You just specify the package name to the apt module and it handles the conditional logic for you.
For restarting the service if a new version has been deployed, look into handlers.
I run a Discord bot. I am using Nodejs on Openshift. I was using their latest cartridge until I realized NodeJS 6.3 has an out of bounds bug.
I have been trying to use an earlier version of Nodejs (like 5.10.1), but I don't know how to set up the application in their cartridge. Does anyone know how to go through the setup process?
According to openshift cartridge nodejs readme, you have to set environment variables NODE_VERSION_URL & NPM_VERSION_URL if you want custom version of node/npm :
NODE_VERSION_URL=https://semver.io/node/resolve/4.3.2
NPM_VERSION_URL=https://semver.io/npm/resolve/3.6.0