IBM Cloud Code Engine: How can I deploy an app from GitLab source without CLI

246 views Asked by At

I create a project and saved it in GitLab.

I tried to download the IBM Cloud CLI to my Windows 10 system and I failed, I try to do it Run as administrator as mention in the CLI docs.

Now, I want to deploy this code project without CLI from source code. I could not find any docs about it.

I read about Dockerfile I should insert into my project but I know nothing about it.

Please help me in 2 ways:

  1. Deploy my project with source code (Gitlab connect to IBM Cloud Code Engine).

  2. Deploy my project using CLI in the windows 10 system.

1

There are 1 answers

0
Holly Cummins On

I just did the same thing as part 1 of your question yesterday. As a prerequisite, you will need a container registry to put things into, such as a free account on Docker Hub.

Start on the Code Engine console.

Choose Start with Source Code, and paste in your on Gitlab URL. (The default is a sample repo which may be useful, especially https://github.com/IBM/hello.

Start with Source Code

On the next page, you can accept most of the defaults but you will need to create a project. That's free, but it needs a credit card so you can use a Pay As You Go account.

create a project

You'll also need to Specify Build Details

specify build details

Here you tell it about your source repo, and where your Dockerfile lives. If you don't have a Dockerfile, you can probably find a sample one for your chosen runtime (C#? Node.js? Java?), or you can try using the Cloud Native buildpack. The build pack will try and work out how to run your code by inspecting what files you have.

cloud native buildpack

Finally, on the last page of the build details, you will need to tell it where your container registry lives. This is a repository used to store the built images. If you set up a personal account on docker hub, you can just enter the credentials.

container strategy

Once you've done that, you can choose Done in the sidebar:

done

and then Create

create

You should get a page which shows your image is building

building

and then once the build is done, in the top right you'll get a link to take you to your app's web page:

open app url

If you get stuck, there's a good set of documentation.