Can Cloud Foundry deploy chaincode to BlueMix - ibm-cloud

Is it possible to deploy go blockchain code to a BlueMix blockchain service using cloud foundry from a private git repo?
The BMX chaincode REST api deployment descriptor warns:
you will need to have the chaincode stored in a public git repository
The url deployment also relies on a public git repo:
https://bluemix.net/deploy?repository=https://github.com/ibm-blockchain/marbles.git
I'm not having much luck finding an example cloud foundry manifest.yml configuration file to deploy straight from my private git clone.

I don't think it is currently possible, see issue.
If you do a local deployment you can test your chaincode without the need of having it in any repository. To do so follow these instructions.
Edit: check this answer to see how to deploy chaincode in a local development setup without having it on github.

Related

Connect to Enterprise GitHub from Terraform cloud function

I am trying to create a Google Cloud function through Terraform. The source code for the function is in Enterprise GitHub. https://github.xyz.com/cf
The Terraform code is as below:
resource "google_cloudfunctions_function" "cfcluster" {
name = "cfcluster1"
project = "${var.project_id}"
region = "us-central1"
runtime = "python39"
source_repository {
//url="https://github.xyz.com/cf" #is this possible?
}
Is it possible to connect to Enterprise GitHub from Google CloudFunction in Terraform? How can I achieve it?
Note
I don't want to connect to cloud-source repository from Terraform.
I don't think you can pull data from a GitHub repository directly. What you can do is to mirror it to your project's Cloud Repository, and then you can use the data within the Google Cloud Platform as you wish. Here you can find a document on how to mirror your GitHub Repository [1].
You can also take a look at this tutorial [2], here you can find the complete steps to deploy an application in Google Cloud Platform from a Github Repository.
[1] https://cloud.google.com/source-repositories/docs/mirroring-a-github-repository
[2] https://medium.com/swlh/deploying-github-repository-to-google-cloud-platform-997d296547e6

Programmatically Connecting a GitHub repo to a Google Cloud Project

I'm working on a Terraform project that will set up all the GCP resources needed for a large project spanning multiple GitHub repos. My goal is to be able to recreate the cloud infrastructure from scratch completely with Terraform.
The issue I'm running into is in order to setup build triggers with Terraform within GCP, the GitHub repo that is setting off the trigger first needs to be connected. Currently, I've only been able to do that manually via the Google Cloud Build dashboard. I'm not sure if this is possible via Terraform or with a script but I'm looking for any solution I can automate this with. Once the projects are connected updating everything with Terraform is working fine.
TLDR; How can I programmatically connect a GitHub project with a GCP project instead of using the dashboard?
Currently there is no way to programmatically connect a GitHub repo to a Google Cloud Project. This must be done manually via Google Cloud.
My workaround is to manually connect an "admin" project, build containers and save them to that project's artifact registry, and then deploy the containers from the registry in the programmatically generated project.

Deploy from Github to multiple clouds?

Greetings from Brazil!
I have an app in github which I am deploying to a cloud service. I want to deploy this same app to other services such as Heroku, AWS and/or IBM Cloud, using Github diff changes (i.e. when I update the repo it automatically updates the cloud app - like magic). Currently GitHub diff changes works fine with streamlit share and heroku, but I have separate repos.
My questions is that: can I deploy an app to multiples services from just one repository in GitHub?
Irrelevant for the question: currently the app is Python3 and I share the app in streamlit share and Heroku, using separate repos. My question, however, is app agnostic.
You can use GitHub Actions to define your deployment workflows.
You can deploy to various cloud providers using available actions/operators:
Amazon ECS
Azure
Heroku
Your project can define a workflow for each cloud provider and, within each workflow, decide when the deployment occurs (automatically on every push, only selected branches or manually - pushing a button).

Does Google Cloup Platform have a Github like repository

I am very new to both GCP and github.
For an application running on GCP, I want to push my code from my local machine to GCP. I know that GCP is very well connected with Github.
However I am wondering if GCP has a service similar to github for hosting private repositories? If so, where can I find more info about it.
If not, is there a way to avoid a separate paid monthly subscription?
Yes, here is the documentation : https://cloud.google.com/source-repositories/

How do I set up a gitlab integration in Bluemix DevOps ToolChain?

IBM Bluemix DevOps ToolChain allows source code repositories to be only github and IBM version gitlab. My repo is in the public gitlab cloud and i do not intend to move it to IBM's gitlab cloud. How do I set up my Toolchain?
Update: It is now possible to add gitlab.com repositories (or repositories from any other GitLab server on the public internet) to Bluemix DevOps Toolchains. More details are available in the Bluemix Documentation.
Original (outdated) answer:
It is not currently possible to add repositories on gitlab.com or other public GitLab servers to an IBM Bluemix DevOps toolchain. However, that capability is actively under development.
Until that feature is available, you could proceed by duplicating your repository to one of the supported Git providers. There are instructions for duplicating a repository at https://help.github.com/articles/duplicating-a-repository/. In short:
git clone --bare https://github.com/exampleuser/old-repository.git
cd old-repository.git
git push --mirror https://github.com/exampleuser/new-repository.git
The example uses github.com, but this approach would work for any git repository.
I think this has been added recently, you can just pick it when you add a tool to your toolchain. There's also a blog post about it https://serifandsemaphore.io/build-a-serverless-api-in-seconds-with-go-c504398d86f6