phobos-api

module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2024 License: MPL-2.0

README

Phobos API

Phobos is a release management and deployment orchestration tool.

Get started

Instructions on building a binary from source can be found here.

Installing locally (Requires Docker)

In order to use Phobos locally, a docker-compose.yml file is available under the docker-compose directory. The use of this requires the installation of Docker. Learn more here.

1. Clone the repository and change to 'docker-compose' directory.
2. Use 'docker compose up' command to launch Phobos using Docker. We could additionally, pass in a `-d` flag to the command to launch everything in the background like so 'docker compose up -d'.

At this point, Docker should begin pulling down all the images needed to provision Phobos. Once this is complete, the Phobos UI will be available at http://localhost:3000/.

Now, the Phobos CLI can be used to interact with Phobos. To configure the CLI, use the following command to create a profile and sign in using the KeyCloak identity provider (IDP):

phobos configure --profile local --endpoint-url http://localhost:6560
phobos -p local sso login

At the KeyCloak login screen use martian for both the username and password to complete authentication.

Congratulations! The Phobos CLI is now ready to issue commands, use the -h flag for more info!

Running Phobos API from local source

In order to run Phobos API from local source we suggest you do the following:

1. Stop the phobos-api docker container if it is running.
2. Copy the `env.example` file in the root folder and paste it as `.env`.
3. Open the Phobos API folder in Visual Studio Code.
4. Install the recommended extensions.
5. Click the `Run and Debug` menu on the left hand side of Visual Studio Code.
6. Click the Start Debugging button next to Launch API.

At this point you can interact with the Phobos UI at http://localhost:3000/ and it will be communicating with your local Phobos API.

Documentation

Security

If you've discovered a security vulnerability in the Phobos API, please let us know by creating a confidential issue in this project.

Statement of support

Please submit any bugs or feature requests for Phobos. Of course, MR's are even better. :)

License

Phobos API is distributed under Mozilla Public License v2.0.

Directories

Path Synopsis
cmd
agent
Package main contains the top-level code for the Phobos org agent.
Package main contains the top-level code for the Phobos org agent.
apiserver
Package main is the entrypoint to the API.
Package main is the entrypoint to the API.
job
Package main package
Package main package
internal
agent
Package agent provides the agent that will claim and run the jobs.
Package agent provides the agent that will claim and run the jobs.
agent/jobdispatcher
Package jobdispatcher package
Package jobdispatcher package
agent/jobdispatcher/docker
Package docker package
Package docker package
agent/jobdispatcher/ecs
Package ecs package
Package ecs package
agent/jobdispatcher/kubernetes
Package kubernetes package
Package kubernetes package
agent/jobdispatcher/kubernetes/configurer
Package configurer package
Package configurer package
Package eks package
agent/jobdispatcher/local
Package local package
Package local package
api
Package api contains the client-facing layers, such as, the RESTful endpoints where clients can interact with the API.
Package api contains the client-facing layers, such as, the RESTful endpoints where clients can interact with the API.
api/controllers
Package controllers adds support for RESTful endpoints.
Package controllers adds support for RESTful endpoints.
api/graphql
Package graphql package
Package graphql package
api/graphql/loader
Package loader package
Package loader package
api/graphql/resolver
Package resolver contains functionality for interacting with the API via GraphQL.
Package resolver contains functionality for interacting with the API via GraphQL.
api/graphql/schema
Package schema contains all of the Schema Definition Files (abbreviated SDL) which define this API.
Package schema contains all of the Schema Definition Files (abbreviated SDL) which define this API.
api/grpc
Package grpc implements gRPC functionality.
Package grpc implements gRPC functionality.
api/grpc/reader
Package reader implements a size-limited reader for uploading templates of multiple kinds.
Package reader implements a size-limited reader for uploading templates of multiple kinds.
api/grpc/servers
Package servers implements the gRPC servers.
Package servers implements the gRPC servers.
api/middleware
Package middleware allows adding custom middleware(s) to the RESTful API, such as, JWT based authentication.
Package middleware allows adding custom middleware(s) to the RESTful API, such as, JWT based authentication.
api/response
Package response providers support for returning http responses
Package response providers support for returning http responses
api/urn
Package urn provides the PRN (Phobos Resource Name) functionalities.
Package urn provides the PRN (Phobos Resource Name) functionalities.
apiserver
Package apiserver is used to initialize the api
Package apiserver is used to initialize the api
apiserver/config
Package config contains the configuration for the API.
Package config contains the configuration for the API.
asynctask
Package asynctask allows running tasks asynchronously.
Package asynctask allows running tasks asynchronously.
auth
Package auth authenticates and authorizes a subject attempting to access API resources.
Package auth authenticates and authorizes a subject attempting to access API resources.
db
Package db encapsulates all the logic needed to access information form the DB.
Package db encapsulates all the logic needed to access information form the DB.
events
Package events supports subscribing to database events.
Package events supports subscribing to database events.
gid
Package gid package
Package gid package
http
Package http package
Package http package
jobexecutor
Package jobexecutor provides the functionality to execute a job
Package jobexecutor provides the functionality to execute a job
jobexecutor/client
Package client is the gateway for the job executor to interface with the Phobos API.
Package client is the gateway for the job executor to interface with the Phobos API.
jobexecutor/volume
Package volume is used to mount volumes inside the job executor.
Package volume is used to mount volumes inside the job executor.
jobexecutor/volume/vcs
Package vcs handles the mounting of VCS volumes (repositories).
Package vcs handles the mounting of VCS volumes (repositories).
limits
Package limits package
Package limits package
logstream
Package logstream provides functionality for saving and retrieving logs
Package logstream provides functionality for saving and retrieving logs
metric
Package metric contains functionality about Prometheus metrics including support for a histogram and a simple counter.
Package metric contains functionality about Prometheus metrics including support for a histogram and a simple counter.
models
Package models defines Phobos resources and their properties as structs.
Package models defines Phobos resources and their properties as structs.
plugin
Package plugin defines a plugin store the API uses including, an object store, rate limiting, etc.
Package plugin defines a plugin store the API uses including, an object store, rate limiting, etc.
semver
Package semver package
Package semver package
services/activityevent
Package activityevent provides functionality for the activity events which are used to track changes to Phobos resources.
Package activityevent provides functionality for the activity events which are used to track changes to Phobos resources.
services/agent
Package agent contains all functionalities related to Phobos agents, which are responsible for claiming and running jobs.
Package agent contains all functionalities related to Phobos agents, which are responsible for claiming and running jobs.
services/approvalrule
Package approvalrule implements functionality related to Phobos approval rules.
Package approvalrule implements functionality related to Phobos approval rules.
services/comment
Package comment implements functionality related to Phobos comments.
Package comment implements functionality related to Phobos comments.
services/environment
Package environment contains all functionalities related to Phobos environments.
Package environment contains all functionalities related to Phobos environments.
services/job
Package job implements functionality releated to Phobos jobs
Package job implements functionality releated to Phobos jobs
services/lifecycletemplate
Package lifecycletemplate implements functionality related to Phobos lifecycle templates.
Package lifecycletemplate implements functionality related to Phobos lifecycle templates.
services/membership
Package membership contains all logic for memberships.
Package membership contains all logic for memberships.
services/metric
Package metric provides functionality for collecting / computing metrics on different Phobos resources.
Package metric provides functionality for collecting / computing metrics on different Phobos resources.
services/organization
Package organization implements functionality related to Phobos orgs.
Package organization implements functionality related to Phobos orgs.
services/pipeline
Package pipeline implements functionality related to Phobos pipelines.
Package pipeline implements functionality related to Phobos pipelines.
services/pipelinetemplate
Package pipelinetemplate implements functionality related to Phobos pipeline templates.
Package pipelinetemplate implements functionality related to Phobos pipeline templates.
services/pluginregistry
Package pluginregistry implements a service for interacting with the plugin registry.
Package pluginregistry implements a service for interacting with the plugin registry.
services/project
Package project implements functionality related to Phobos projects.
Package project implements functionality related to Phobos projects.
services/projectvariable
Package projectvariable set implements functionality related to project variables
Package projectvariable set implements functionality related to project variables
services/release
Package release provides the release service.
Package release provides the release service.
services/releaselifecycle
Package releaselifecycle implements functionality related to Phobos release lifecycles.
Package releaselifecycle implements functionality related to Phobos release lifecycles.
services/resourcelimit
Package resourcelimit package
Package resourcelimit package
services/role
Package role implements the service layer functionality related to Phobos roles.
Package role implements the service layer functionality related to Phobos roles.
services/scim
Package scim package
Package scim package
services/serviceaccount
Package serviceaccount package
Package serviceaccount package
services/team
Package team package
Package team package
services/todoitem
Package todoitem contains the core business logic for the todoitem service.
Package todoitem contains the core business logic for the todoitem service.
services/user
Package user implements functionality relating to users CRUD.
Package user implements functionality relating to users CRUD.
services/vcs
Package vcs package
Package vcs package
services/vcs/github
Package github package
Package github package
services/vcs/gitlab
Package gitlab package
Package gitlab package
services/vcs/types
Package types package
Package types package
tracing
Package tracing package
Package tracing package
pkg
client
Package client contains a client implementation for interfacing with the Phobos server
Package client contains a client implementation for interfacing with the Phobos server
hcl/config
Package config contains the HCL config structs
Package config contains the HCL config structs
hcl/context
Package context contains functionality for constructing HCL eval contexts
Package context contains functionality for constructing HCL eval contexts
hcl/validate
Package validate contains functionality for validating that a pipeline template HCL file is valid
Package validate contains functionality for validating that a pipeline template HCL file is valid
hcl/variable
Package variable provides a way to parse and validate variables in a HCL file.
Package variable provides a way to parse and validate variables in a HCL file.
logstream
Package logstream is used to buffer and write logs to a log stream server
Package logstream is used to buffer and write logs to a log stream server
plugin
Package plugin is used to manage the execution of Phobos plugins
Package plugin is used to manage the execution of Phobos plugins
statemachine
Package statemachine contains the state machine logic for a pipeline in the form of an acyclic graph
Package statemachine contains the state machine logic for a pipeline in the form of an acyclic graph

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL