IBM Cloud Private - Deploy Node Js application - kubernetes-helm

We have configured IBM Cloud Private 2.1.0.3
We have sample node application. We need to deploy the same in ICP console.
We have followed the procedures listed in the below link.
https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0.3/app_center/create_helm_cli.html
Please suggest suitable methods.

to deploy an application, you can deploy using
cli
ICP UI
CLI
using helm chart you created
i have a sample project where I shows a java app how it is package and deploy, hopes it helps
https://github.com/ibmcloudprivate2/wildfly
using deployment file
UI
using helm chart you created and added into the UI catalog and deploy using it
see above .
using deployment and service
the following project, i have package a ng sample and shows how to deploy using the UI Workloads/Deployment/Create Deployment and Network Access/Services/Create Service
https://github.com/ibmcloudprivate2/ng4-admin
hopes it helps.

Related

Cloud Functions Deployment Issue (.Net 6)

This is the first time I'm working on Google Cloud Functions. I've created a http trigger cloud function using .Net6 framework and trying to deploy it using gcloud Cli. The deployment was failing, and I know why but don't know how to solve it.
I've couple of cs-projects, Cloud Functions project (CFP), Application Services project (ASP) and DBRepositories project (DBP). CFP has a reference of ASP which then has a reference of DBP. I've initiated the deployment from the directory of where Function1.cs(CFP) located. The deployment was unable to locate the other two projects rereferred to CFP.
Project reference visualization:
CloudFunctions.csproj <- ApplicationServices.csproj <- DBRepositories.csproj
I even initiated the deployment from the directory where solution file is located but failed with error "Too many projects found."
Cli command:
gcloud functions deploy demo-function --entry-point HelloFunction.Function1 --runtime dotnet6 --trigger-http --allow-unauthenticated --gen2 --region us-central1
I'm stuck here, any help greatly appreciated. TIA

Spring Data Flow Helm chart: Is there a way to declare creation of applications and tasks within the helm charts?

The only way I am running into is using curl command as per the docs: https://docs.spring.io/spring-cloud-dataflow/docs/2.7.1/reference/htmlsingle/#resources-app-registry-post
This uses a curl command to hit the api. Which I can develop a script for, but I would like to set this up within the helm charts so that these tasks and applications are created when the helm chart is deployed. Any ideas?
Please check Spring Cloud Data Flow, Helm Installation, Register prebuilt applications, it says:
Applications can be registered individually using the app register functionality or as a group using the app import functionality.
So, I guess you always need to start the app using Helm Chart and only later register the applications using app or REST Endpoint.

We are deploying Open Loyalty on to Google Cloud and we are receiving a Yarn error?

We are installing Open Loyalty Program on to the Google Cloud. Please Google Open Loyalty by Divante Ltd.
We have been trying to deploy this application on google cloud using Kubernetes.
The instance used to deploy this application contains Debian v4.9 as its OS. And we installed Docker, GCloud, Kubernetes and Kompose as the tools for deployment. We built two docker images for the frontend and backend and linked them to the docker-compose file. Now in frontend image, we used (node:5) image from docker hub in Dockerfile of the frontend.
We also changed the docker-compose file as seen below:
enter image description here
After changing the docker-compose file, we ran “kompose up” within the same directory.
which created the deployment and service ‘yaml’ file and then proceeded to run it.
We have pods as given below, but the frontend pod shows some error and some logs.enter image description here
It says yarn not found. When we execute the same process on a local machine, it works as expected.
We are also trying to seek help from Google Support but your help and suggestions will also be highly appreciated.
Yarn is available from node:6. Your front-end image is too old.

How Karaf and Fabric containers are related?

I have installed jboss-fuse-karaf-6.3.0 and created a project in developer studio.
I'm not able to figure out certain concepts around it.
In Apache Fuse how Karaf and Fabric containers are related ? What I understood is Karaf provides runtime environment for the project to run. Fabric is for managing deployments. Is that correct ?
I have started Karaf container by running FuseInstall/bin/start.bat . How to start the fabric container ?
Is http://localhost:8181/hawtio is fabric console ?
Is there a way to directly deploy a project to Karaf container using maven ? or we need to deploy the project to fabric ?
Thanks !
Fuse is an ESB product by Redhat. And yes, you understood it correctly that Karaf provides an OSGI runtime whereas Fabric is for managing multi-container deployments.
You don't start a fabric container. You need a Fabric agent or something similar for that. Not very familiar with it, but you can refer Fuse's documentation here and here regarding this.
Hawtio is basically a visual management console for various containers.
You can definitely deploy your OSGI bundle directly into a Karaf container. There are various commands such as :osgi:install " OR placing the bundle at FuseInstallDir/deploy. The Documentation it explains much better.
A Fabric is just a group of commonly managed Karaf containers. It lets you manage your containers using Profiles instead of just features and bundles.
Once you have started a Karaf container you can CREATE a Fabric. Follow these instructions: https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.2.1/html-single/Fabric_Guide/index.html#Deploy-Fabric-Create . Any other Karaf containers you start will then be JOINED to the existing Fabric.
Once the Fabric has been created, localhost:8181/hawtio will have Fabric specific content
If you are using Fabric, then you can use the fabric8 Maven plugin to deploy your application to a Profile directly. See more details here: https://fabric8.io/gitbook/mavenPlugin.html . Basically you can just run mvn fabric8:deploy and it will update the fabric to use your new code. Be careful here as this will tell Fabric where to find your new code in its list of Maven repos. If you have not deployed your code to a central or shared repo and it is only on your local machine, and the container that is getting the deployment is on a separate machine, it will not work.
Be sure to read up on how profiles work as well, because adding your code to a profile does not add it to a container unless that container is already set up to include the profile you are updating. The fabric guide I linked first explains this well.

Bluemix Deploy Behaviors - Declared Services

I have the following manifest.yml file for a WAR file deployment to Liberty on Cloud Foundry-based Bluemix. When I use the deploy stage from the pipeline to my own workspace, the declared services and service bindings to the app from my manifest file are ignored. However, when using the Deploy to Bluemix button, the dependent services and bindings are created.
How can I force the deploy stage to create and bind services if they don't exist in the space when NOT using "Deploy to Bluemix" but simply using the deploy stage?
---
declared-services:
tuck-cloudant-cloudantNoSQLDB:
label: cloudantNoSQLDB
plan: Shared
applications:
- services:
- tuck-cloudant-cloudantNoSQLDB
- name: HelloWorldTuck4
path: HelloWorld.war
Thanks!
Jeff
The service bindings in the file manifest.yml are IBM extensions to the Cloud Foundry standard (see the Deploy to Bluemix) which are hopefully incorporated. However, at this time only the special deployment processing of the Deploy to Bluemix button will take care of that declared services section and will provision the services for you.
Indeed you can script the service creation in the pipeline.
There is even a way to make it occur with a Deploy to Bluemix button, using a pipeline.yml file in your sample repo: https://console.ng.bluemix.net/docs/develop/sharetextpipelines.html
See an example there:
https://github.com/hmagph/sample-java-cloudant
The declared services are specific to Deploy to Bluemix. You can, however, run pretty much any cf cli command you want in the deploy stage. You should be able to do a cf create-service ... or a cf bind-service .... This would have to be done manually, adding lines to the deploy script.