I have an active/working Node/Mongo app on Openshift Origin (v2) but I apparently have to migrate to the v3 system soon so, whilst I've attempted to follow the (frankly way too basic) migration guide, I'm hitting an error which is meaningless to me.
I've edited my project as per the migration guide, moved it to GitHub, setup v3, run "oc login" and I'm trying to create a new-app from the GitHub code with
oc new-app https://github.com/shrewdlogarithm/steamtrayapi.git --name=steamtrayapi
It runs for a while and then spits out the following errors
error: User "censored#gmail.com" cannot create imagestreams.image.openshift.io in project "default"
error: User "censored#gmail.com" cannot create buildconfigs.build.openshift.io in project "default"
error: User "censored#gmail.com" cannot create deploymentconfigs.apps.openshift.io in project "default"
error: User "censored#gmail.com" cannot create services in project "default"
I have no idea where to go from there.
Note: see comment - seems to be an authentication issue and/or just a badly documented process.
If anybody was following these migration directions, the issue is that in openshift 3 applications need to be placed under projects. Those instructions don't bother to mention that, but what you want to do is create a new project if you don't have one already
oc new-project <project-name>
Now run the oc new-app command you previously tried, and it should work.
Related
I have an App Engine Service, running on Google Cloud Platform.
I run an old version of my NodeJS application on it.
After having updated my code, I have run the following command: gcloud app deploy, in my GCP console, directly. It shows no error.
It says 'X files updated' and after that, I go on my application and the code is actually not updated.
I expect my code to be deployed and therefore, updated, after I run this command.
Why is this expectation not met?
Are you sure you are deploying to the same version? If you're deploying a different version, did you migrate traffic to this new version? To check this, login to console.cloud.google.com > App Engine > Versions
This will show you all the versions you currently have deployed and you can confirm which one(s) are serving traffic
You should also confirm that you actually have the 'updated' source code deployed. Following the link in bullet 1 above, you should see a column that says 'Diagnose' with 'TOOLS' under it. Click on the drop down and select 'source'. This will show you your source code. Confirm you have your updated code
If your files are static, they could be cached. You can try using cache bursting techniques (search Stackoverflow for this), or wait for some time and try again.
I am very much new to GCP & Node JS, recently I started working on a cloud function development in Nodejs.I researched many websites to begin my development so don't know which step I followed but somehow I am able to develop a simple Nodejs project that connects to Google BigQuery to execute some SQL statement on my local machine in VSCode IDE. At first, as it was giving some error while connecting to GCP, I found a few solutions like configuring the project in Google Cloud Shell to authenticate it.
Everything went smoothly and my code connected to BigQuery successfully. Some days later I shutdown a new project I created on GCP Console, then tried to execute my local code which worked perfectly earlier. It is now throwing an error as soon as it tries to connect to BigQuery part of the code.
Error is:
Uncaught ApiError Error: Project project-X has been deleted.
I tried to config new project using the command:
gcloud config set project myProject-XYZ
output is: Updated property [core/project].
Then again I tried to run my code in VS Code, but the problem still persists. Not sure where to set a new project or remove reference to the old/shutdown project.
I am expecting some guidance in order to understand this development.
Reviewing information for GCP projects, the following could help with the project you will use.
There are several possible identifiers for GCP projects:
Each project is granted a 12-digit identifier called a "project
number."
When creating a project, you can choose a unique alphanumeric ID,
however it cannot be modified. The default value is frequently
obvious-animal-1234.
"project name" is a freeform text string that you can alter at any
time.
Additionally to the information above, you can run gcloud projects list to see a list of projects and their ID/number/name to verify you are using the right identifier.
Remember that you should use the project ID with gcloud.
Do you have in mind that the Cloud Resource Manager API should be enabled in your Google Cloud Console?
Here is the direct link to the App Engine Admin API.
Now, according to the last part of your question, you can use the command: gcloud config unset account
I'm having a problem with the Azure Web Application. The problem is this ... After creating a Web Service that uses a Linux service plan to upload my front-end app that was developed in React.js, the following error started to appear after a day of testing ... when i click on my website link it loads for about 5 minutes (this time can vary up to 15 minutes), and an error appears - :( Application Error , together with a link for Azure Diagnostics. This link takes me to a screen where it shows me some errors and a table with errors 503 and 502.3, I'll put the image here in the post, I just don't know what to do, I started using azure a short time ago and this is my first contact with this type of error.
discussion about the bug in the microsoft community
The link above shows a discussion that I opened in the microsoft community where I followed the tips, however, the error persisted.
In one of my last attempts I cleared my code cache in vsiual studio code and deleted the node modules, after that I executed the command "yarn install" and when I tried to perform the deployment I received a different error with the name "npm ERR! code ELIFECYCLE ”.
As was requested in one of the comments I created a repository and made the code I am trying to deploy for testing available ... follow the link github.com/LucasClaraCloud/project_Frontend-
Your project is too complicated. After testing, I can only provide you with an idea. It works for me
Deploy the build folder generated after npm run build to the /home/site/wwwroot folder path.
Then add startup command on portal with npx serve -s.**
Why
Under normal circumstances, deployment is the folder after deploying the build. The advantages are as follows,
1. Security
This can protect the security of the file code. Generally, few developers will directly deploy source code files to a web server.
2. Fast
The compiled files are relatively small and the deployment is very fast.
Test steps and phenomena::
Use github for continuous deployment. In the git action, the release is successful, but the web page prompts the same as you described, Application Error. View the log the same as yours.
Try to FTP the project file to wwwroot (no node_modules folder), and then execute npm install. It runs for a long time, and finally an error occurs.
Test Result
I want to deploy Strapi to my Azure. Anyone here who has an experience doing such and making it up and running completely? Somehow I couldn't find any detailed instructions how to do that in Azure.. I'm looking for something that is as easy as deploying it to Heroku - but it's fine though if it'll require more steps as long as I can make it to work completely.
This is the complete instruction I have also created in the README of the repository.
Strapi-Azure 3.1.3
This is a working repository of Strapi 3.1.3 which you can already deploy as an Azure Web App. This requres a paid subscription, minimum of B1 plan (32 USD estimated), so we can enable the 64-bit platform configuration and the Always On feature.
To get started, let us first create and configure our Azure Web App:
Create an instance:
Name: The name of your choice that is still available
Publish: Code
Runtime staci: Node 12 LTS
Operating System: Windows
Region: select near you
Sku and Size: select B1 (minimum)
Configure the Environment variables:
Add the following key-value pairs:
For the HOST make a ping to your .azurewebsites.net instance and get the IP
Configure the Platform Settings
In the General Settings tab (beside the Application Settings), change the Platform from 32 Bit to 64 Bit
To confirm if you are indeed now on 64 Bit mode, go to Console and run node -p "process.arch"
Install yarn:
Go again to Console and run: npm install -g yarn
Deploy from your github account a copy of strapi-azure repo
In the Deployment Center tab, connect your GitHub account and browse your copy of strapi-azure
Select App Service build service as your build provider
Select repository and branch
Deploy!
Build your Admin UI using Kudu service
Go to Advance Tools -> Go -> expand Debug console from the toolbar -> CMD
Inside the wwwroot directory (site/wwwroot/), execute yarn build
See it in action 😊
It should not be any different than installing Strapi on any VM (Azure, AWS, GCP or even local VM).
Quick start guide should help you setup things and run Strapi server --> https://strapi.io/documentation/3.x.x/getting-started/quick-start.html
Primarily: Install nodejs, npm and strapi (via npm). Execute strapi new cms --quickstart and you should be good to go (with default configuration).
Assuming you have it within a GIT repository, I may have some useful insights.
When I set mine up, I created an app service hosted on windows - for some reason I found the Linux ones very unstable. I then used the Deployment Center to then setup the connection between my repository hosted on Azure Devops onto my App Service. When it deploys IISNode will automatically be setup with an appropriate web.config file for getting a NodeJS server up and running.
You may need to ensure you are running in production (assuming this is what you want), you can set this up by going to the App Service - Configuration - Application Settings (tab) - set up new variable called
"NODE_ENV" and set this "PRODUCTION".
I also found it useful to set
"WEBSITE_NODE_DEFAULT_VERSION" and specify the version - in my case it was "10.15.2".
For the database I used a ComosDB with the Mongo API, this was hosted on azure and it worked OK - the main problem I found was that I was getting charged a lot for the usage of it, not quite sure at this stage how to get around it.
One thing that did catch me out was setting the "port" variable within the config/environments/production/server.json - I was hard coding a port which doesn't work within IISNode - this needs to be set to something like
"host": "your.domain.com"
"port": "${process.env.PORT || 1280}"
You will also need to setup your database settings in config/environments/production/database.json file.
Happy to work through any further points, let me know
I am trying to get my head around Node.js and using it for building bots. There's a long convoluted reason why I need to do this, the TLDR version is I need it for university.
Anyway, I have found a book online, it's called "Building Bots with Node.js" by Packt publishing. I am working through the book, and I have got to a section where I am supposed to Deploy my app to azure. The book says to do the following, in order:
Create a site with azure site create --git (sitename)
Run git add .
Run git commit -m "TwilioNodeBot first commit
Run git push azure master
Now, steps 1-3 worked fine. But when I get to step 4, I get a Windows pop-up asking me to enter credentials for my site. I have tried everything I can think of, but no matter what I enter I get the following error:
fatal: Authentication failed for 'https://username#sitename.scm.azurewebsites.net/sitename.git/'
Now, the thing is, it says the following in the book:
"After you type these commands, if you've never set up git/FTP deployment credentials for your Azure subscription, you'll also be prompted to create them. You can also enter these credentials on the Azure Portal."
I was never asked to create credentials. I did a bit of web searching and found out how to go into my portal and view my publishing profile, and get the username/password out of there. But when I do enter this information it doesn't work. I even tried resetting my credentials, but this didn't work either.
There's no information in the book about what to do here, and I cannot contact the author as there is no contact info.
Any ideas? What am I supposed to use for my publishing credentials?
OK, I figured it out. I had to open my "config" file in the ".git" folder and update the username at the start of the url.