{"id":21523678,"url":"https://github.com/bhojpur/belaur","last_synced_at":"2025-03-17T17:45:02.144Z","repository":{"id":103409439,"uuid":"486442708","full_name":"bhojpur/belaur","owner":"bhojpur","description":"The Bhojpur Belaur is an efficient, high performance, software DevOps pipeline management engine applied within the Bhojpur.NET Platform ecosystem for delivery of applications or services.","archived":false,"fork":false,"pushed_at":"2022-04-30T06:57:09.000Z","size":1185,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T05:09:54.409Z","etag":null,"topics":["pipeline-framework"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/u/bhojpur","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bhojpur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-28T04:15:50.000Z","updated_at":"2023-09-01T19:42:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9880b13-8577-4c5e-8663-bdcb53853be1","html_url":"https://github.com/bhojpur/belaur","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhojpur%2Fbelaur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhojpur%2Fbelaur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhojpur%2Fbelaur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhojpur%2Fbelaur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhojpur","download_url":"https://codeload.github.com/bhojpur/belaur/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244081865,"owners_count":20395169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pipeline-framework"],"created_at":"2024-11-24T01:19:04.586Z","updated_at":"2025-03-17T17:45:02.126Z","avatar_url":"https://github.com/bhojpur.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bhojpur Belaur - Pipeline Management\n\nThe `Bhojpur Belaur` is a *high performance* __DevOps__ *pipeline management* engine\napplied within the [Bhojpur.NET Platform](https://github.com/bhojpur/platform)\necosystem for delivery of distributed `applications` or `services`. Initially, it\nwas designed for software builds, but it could be customised for `AI/ML` models or\nto process any kind of data (e.g., image, audio/video, simulation models, CRM/ERP).\n\n## Getting Started\n\nFirstly, the `Bhojpur Belaur` leverages a standard `Kubernetes` instance to manage\nmultiple build pipelines for your software applications.\n\n### Build Source Code\n\nFirstly, clone this `Git` reporitory in a folder. You would require `Go` programming\nlanguage runtime to build the `Belaur CLI`. You need `Node.js` also for building the\n`Belaur Dashboard`. Now, issue the following commands in a terminal window.\n\n```bash\ngo mod tidy\nmake compile_frontend\nmake static_assets\nmake compile_backend\n```\n\nif successful, then you could run the following command in another terminal window.\n\n```bash\nmake dev\n```\n\nor\n\n```bash\nbelaur -home-path=${PWD}/tmp -dev=true\n```\n\nin a development mode. Now, open the `http://localhost:8080` URL in a web broswer.\n\n### Installation\n\nThe installation of `Bhojpur Belaur` is simple and often takes a few minutes only.\n\n#### Using Docker\n\nThe following command starts `Bhojpur Belaur` as a daemon process and mounts all data\nto the current folder. Afterwards, `Bhojpur Belaur` will be available on the host system\non port 8080. Use the standard user *admin* and password *admin* as initial login. It is\nrecommended to change the password afterwards.\n\n```bash\ndocker run -d -p 8080:8080 -v $PWD:/data bhojpur/belaur:latest\n```\n\nIt uses the `Docker` image with the *latest* tag, which includes all required libraries\nand compilers for all supported languages. If you prefer a smaller image suited for a\npreferred language, then you have a look at the `available docker image tags`_.\n\n#### Manually\n\nIt is possible to install `Bhojpur Belaur` directly on the host system. This can be\nachieved by downloading the binary from the `releases page`_.\n\nThe `Bhojpur Belaur` will automatically detect the folder of the binary and will\nplace all data next to it. You can change the data directory with the startup\nparameter *-home-path*, if you want.\n\n#### Using Helm\n\nIf you haven't got an `ingress controller` pod yet, make sure that you have\n`kube-dns` or `coredns` enabled, run this command to set it up.\n\n```bash\nmake kube-ingress\n```\n\nTo init helm:\n\n```bash\nhelm init\n```\n\nTo deploy `Bhojpur Belaur`:\n\n```bash\nmake deploy-kube\n```\n\n### Example Pipelines\n\n#### Go\n\n```golang\n    package main\n\n    import (\n        \"log\"\n\n        sdk \"github.com/bhojpur/gosdk\"\n    )\n\n    // This is one job. Add more if you want.\n    func DoSomethingAwesome(args sdk.Arguments) error {\n        log.Println(\"This output will be streamed back to Bhojpur Belaur and will be displayed in the pipeline logs.\")\n\n        // An error occurred? Return it back so Bhojpur Belaur knows that this job failed.\n        return nil\n    }\n\n    func main() {\n        jobs := sdk.Jobs{\n            sdk.Job{\n                Handler:     DoSomethingAwesome,\n\t            Title:       \"DoSomethingAwesome\",\n\t\t        Description: \"This job does something awesome.\",\n\t        },\n\t    }\n\n\t    // Serve\n\t    if err := sdk.Serve(jobs); err != nil {\n\t        panic(err)\n\t    }\n    }\n```\n\n#### Python\n\n```python\n    from belaursdk import sdk\n    import logging\n\n    def MyAwesomeJob(args):\n        logging.info(\"This output will be streamed back to Bhojpur Belaur and will be displayed in the pipeline logs.\")\n        # Just raise an exception to tell Bhojpur Belaur if a job failed.\n        # raise Exception(\"Oh no, this job failed!\")\n\n    def main():\n        logging.basicConfig(level=logging.INFO)\n        myjob = sdk.Job(\"MyAwesomeJob\", \"Do something awesome\", MyAwesomeJob)\n        sdk.serve([myjob])\n```\n\n#### Java\n\n```java\n    package net.bhojpur.belaur;\n\n    import net.bhojpur.belaur.sdk.*;\n    import java.util.ArrayList;\n    import java.util.Arrays;\n    import java.util.logging.Logger;\n\n    public class Pipeline\n    {\n        private static final Logger LOGGER = Logger.getLogger(Pipeline.class.getName());\n\n        private static Handler MyAwesomeJob = (belaurArgs) -\u003e {\n            LOGGER.info(\"This output will be streamed back to Bhojpur Belaur and will be displayed in the pipeline logs.\");\n\t    // Just raise an exception to tell Bhojpur Belaur if a job failed.\n            // throw new IllegalArgumentException(\"Oh no, this job failed!\");\n        };\n\n        public static void main( String[] args )\n        {\n            PipelineJob myjob = new PipelineJob();\n            myjob.setTitle(\"MyAwesomeJob\");\n            myjob.setDescription(\"Do something awesome.\");\n            myjob.setHandler(MyAwesomeJob);\n\n            Javasdk sdk = new Javasdk();\n            try {\n                sdk.Serve(new ArrayList\u003c\u003e(Arrays.asList(myjob)));\n            } catch (Exception ex) {\n                ex.printStackTrace();\n            }\n        }\n    }\n```\n\n#### C++\n\n```cpp\n   #include \"cppsdk/sdk.h\"\n   #include \u003clist\u003e\n   #include \u003ciostream\u003e\n\n   void DoSomethingAwesome(std::list\u003cbelaur::argument\u003e args) throw(std::string) {\n      std::cerr \u003c\u003c \"This output will be streamed back to Bhojpur Belaur and will be displayed in the pipeline logs.\" \u003c\u003c std::endl;\n\n      // An error occurred? Return it back so Bhojpur Belaur knows that this job failed.\n      // throw \"Uhh something badly happened!\"\n   }\n\n   int main() {\n      std::list\u003cbelaur::job\u003e jobs;\n      belaur::job awesomejob;\n      awesomejob.handler = \u0026DoSomethingAwesome;\n      awesomejob.title = \"DoSomethingAwesome\";\n      awesomejob.description = \"This job does something awesome.\";\n      jobs.push_back(awesomejob);\n\n      try {\n         belaur::Serve(jobs);\n      } catch (string e) {\n         std::cerr \u003c\u003c \"Error: \" \u003c\u003c e \u003c\u003c std::endl;\n      }\n   }\n```\n\n#### Ruby\n\n```ruby\n   require 'rubysdk'\n\n   class Main\n       AwesomeJob = lambda do |args|\n           STDERR.puts \"This output will be streamed back to Bhojpur Belaur and will be displayed in the pipeline logs.\"\n\n           # An error occurred? Raise an exception and Bhojpur Belaur will fail the pipeline.\n           # raise \"Oh gosh! Something went wrong!\"\n       end\n\n       def self.main\n           awesomejob = Interface::Job.new(title: \"Awesome Job\",\n                                           handler: AwesomeJob,\n                                           desc: \"This job does something awesome.\")\n\n           begin\n               RubySDK.Serve([awesomejob])\n           rescue =\u003e e\n               puts \"Error occured: #{e}\"\n               exit(false)\n           end\n       end\n   end\n```\n\n#### Node.js\n\n```javascript\n   const nodesdk = require('@bhojpur/belaursdk');\n\n   function DoSomethingAwesome(args) {\n       console.error('This output will be streamed back to Bhojpur Belaur and will be displayed in the pipeline logs.');\n\n       // An error occurred? Throw it back so Bhojpur Belaur knows that this job failed.\n       // throw new Error('My error message');\n   }\n\n   // Serve\n   try {\n       nodesdk.Serve([{\n           handler: DoSomethingAwesome,\n           title: 'DoSomethingAwesome',\n           description: 'This job does something awesome.'\n       }]);\n   } catch (err) {\n       console.error(err);\n   }\n```\n\nPipelines are defined by jobs and a function usually represents a job. You can define as\nmany jobs in your pipeline as you want.\n\nEvery function accepts arguments. Those arguments can be requested from the  itself and\nthe values are passed back in from the UI.\n\nSome pipeline jobs need a specific order of execution. `DependsOn` allows you to declare\ndependencies for every job.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhojpur%2Fbelaur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhojpur%2Fbelaur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhojpur%2Fbelaur/lists"}