I am trying to use OpenShift to deploy my application.
But it's split up into multiple maven projects and I was looking to get repos corresponding to them. Is it possible to do?
Related
I'm new to github actions and trying to automate creating a docker container when I create a release.
Ideally when I create a new release in github I want it to :
compile the typescript (package.json "build" script)
build the docker image (from existing docker file)
push it to the git hub container repository
I'm using a monorepo with multiple projects and package.json / docker files so I'll want to have a workflow for each and I'm assuming some
I have a secret called ENV_FILE which has my env variables.
Ideally when I create a release I want my docker output to reflect this version.
I've found various bits and pieces but struggling to put it all together.
Currently learning about CI CD for an upcoming project. Currently our project is being hosted on bitbucket and thus can't use Travis CI. Was thinking of using Circle CI in this case. Searched through the internet for examples of how to configure circle CI to deploy to openshift. Does anyone have experience with this?
In this case you do not want to use automatic webhook based build triggering in Openshift based on accepted pull requests in GitHub, but just simply trigger a build by CircleCI via e.g. the Openshift (oc start-build <buildconfig_name> --follow) CLI tool.
Is there a way to trigger a re-deploy when I push an image to docker hub? I used S2I to build an image, put it up on docker hub, and did a deployment from there. How can I trigger a new deployment when I push a new image to docker hub?
Perhaps there is a better way? I created a wildfly image with the changes to the standalone.xml I needed. Then I used S2I to build my local source into a runnable wildfly application image, which is what I pushed and deployed. I'm trying to get around having to go through a github repository.
I'm thinking I could create an application with the customer wildfly image that I created and use the direct from IDE option to the application, but what if I want to use the command line?
You can set a scheduled flag on the image stream to have a remote registry periodically polled. This will only work though if the OpenShift cluster has been configured globally to allow that. If using OpenShift Online I don't believe that feature is enabled.
https://docs.openshift.com/container-platform/latest/dev_guide/managing_images.html#importing-tag-and-image-metadata
If you want to avoid using a Git repository, you can use a binary input build instead. This allows you to push files direct from your local computer. This means you can compile binary artifacts locally and push them into the S2I build done by OpenShift.
https://docs.openshift.com/container-platform/latest/dev_guide/builds/build_inputs.html#binary-source
I have been using eclipse (with openshift plugin) for my Openshift v2 project. Now, I have to migrate.
In Openshift v2, I run local git repositories. Each repository branch has a correpsonding remote (I assume in Openshift V2). I can push/pull etc between local and remote branches. I rarely use rhc nor did I use git command line on my local machine.
In Openshift v3, it seems that I cannot interact with remote Git repositories in Openshift from Eclipse: everything goes through https://github.com. After going through several "migration guidelines", I suspect this will be how to use Eclipse with Openshift V3:
Develop code (mine is JavaEE + Springframework + Mysql) on Eclipse and local git repositories;
Push the code to Github.com repositories (if I don't want to open my code to public, I pay for a private repository at https://github.com);
Use oc command line to get code from github.com into my Openshift V3 project.
Do I get this right?
In Openshift V3, is it possible I can do push code into Openshift project from eclipse directly, without going through github.com?
Correct. To keep that same workflow, you need an external git repo in v3. You don't have to use a paid GitHub.com to get private repos. Sign up for a free account on GitLab.com or Bitbucket.com - both include free private repos.
Then, check out this blog post series on best practices for using private git repos with OpenShift v3, which links to several guides on the subject: https://blog.openshift.com/private-git-repositories-part-1-best-practices/
Note: I prefer just sticking with an external private git repo, but if you don't want to go that route, you can use binary builds, as outlined here: https://stackoverflow.com/a/45892603/663541
I have working app on OpenShift server. My question is - how to update openshift's git repo of my application, if I make some changes using ssh acsess to openshift? I mean not using all this stuff with pull/push to my local mashine.
If I understand you correctly, you would like to modify source code without using git. I am not sure why you would want that. All that stuff with pull/push gives you a version control flexibility which can save you a lot of time when you screw up one thing. For example, you push brand new UI to production, which turns out to be buggy. With git, you have flexibility to revert back to previous version, and work on different branch to fix the bug on UI.
OpenShift follows conventional app structure. Git for source control, maven for build, jbosseap(for example) for app server, jenkins for continuous integration, etc. So, when you push using git, OpenShift will automatically build using maven, then deploy to the server.
If you would like to disregard all that advantages that OpenShift has to offer, use rhc ssh appname to directly work on the server.