GithubHelp home page GithubHelp logo

potku-console's People

Contributors

eddiethecubehead avatar joomakelastudent avatar softgitron avatar

Watchers

 avatar  avatar  avatar

potku-console's Issues

Design modules startup sequence

Describe the supposed addition
Module's and core's API calls are unambiguously defined as can be seen in the PR #11. However API specification does not specify how the module's startup sequence is handled. This detail should be designed and startup sequence diagram should be added into the wiki.

My initial proposal for the startup sequence is following, but can be altered if actual implementer of this issue founds better solution.

  1. Core reads modules manifest files (capabilities and OpenAPI specifications)
  2. Core starts module process with following environment variables
  • CORE_TOKEN=ey... *
  • MODULE_TOKEN=ABC123... **
  1. Core sends X-amount of health check requests on Y interval
  2. If the module responds to the health check request, core decides that module has been successfully started
  3. After that core may register port triggers on service if needed
  4. Handshake is now completed

*CORE_TOKEN is supplied by the module, when sending requests for the core
**MODULE_TOKE is supplied by the core, when sending requests for the module
By utilizing this double token logic, no other module should be able to interfere with the communication.

Pitch your addition with a user story
As a developer I can understand startup sequence between core and module, so that I can implement the startup sequence later on.

Name of the files or sections to be added
Add this under architecture section in the Wiki and add mention of this page into module creation instructions (See issue #22).

Additional context
Issue #22

GCP module, add support for starting existing server

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a cloud module I can start virtual machine using Google Cloud Platform APIs, so that for example Minecraft server can be started.

Describe the solution you'd like
I want that GCP is able to start virtual machines when /servers/machine endpoint is appropriately called.

Describe alternatives you've considered
This is core feature of potku-console and it must be implemented.

Additional context
This issue is continuation to issues #54 #55.

Minecraft module, add support for POST /queries/status

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a core I can query status from Minecraft module, so that I know its player count and can shutdown the server if there are no active players.

Describe the solution you'd like
After core has send this request, Minecraft module should check player amount that is currently active on the actual server. There is two alternative ways for achieving this. First and better solution is that Minecraft module sends standard server poll into actual server DNS. Alternative way is that service module logs into server machine using ssh and scrapes server information. Second method can be quite difficult, because service module does not know anything about server's installation.

Describe alternatives you've considered
Alternatives discussed above.

Additional context
This should be probably last thing that should be implemented, while creating this module.

Add automatic formatter configuration

Is your feature request related to a problem? Please describe.
It is easy to create small mistakes in the code style. Those mistakes are disturbing and create additional burden during code reviews.

Pitch your idea with a user story
As a developer I can format my code automatically using IDE, so that I don't have to take care of the code style fully on my own.

Describe the solution you'd like
I would like to have code style configuration file that is recognized by the Visual Studio Code and can be used for automatically formatting the Rust code. Configuration file should include rules mandated by project's code style conventions. These requirements should be quite easy to fulfill, because current code style follows mostly Rust's standard conventions.

Describe alternatives you've considered
This configuration is not strictly necessary for this project, but it would guarantee nicely that code style would stay consistent throughout the project.

Additional context
Good link for basic information about Rustfmt formatter.

Desing database and add diagram into wiki

Describe the supposed addition
Based on the initial API designs discussed in the PR #11 potku-console database will be quite complex. It would be good that there is proper UML database diagram that would describe construction of the database.

Pitch your addition with a user story
As a developer I can see database construction clearly so that I can work with it easily.

Name of the files or sections to be added

Additional context
This issues was processed in a slightly bad manner, since first version of the database diagram was already available before opening this issue. I thought it would be still good idea to raise official issue for the design, so that it will be absolutely clear for everyone, when database design is actually finished.

Minecraft module, add support for POST /triggers

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a potku-console core I can create new triggers on the Minecraft module, so that I can receive startup request, when player is about to join server.

Describe the solution you'd like
This issue adds basic functionalities for trigger creation in the Minecraft module. To close this issue module should be able to keep track of ports that should be open and add new listeners for those ports. While solving this issue, it is not yet necessary to implement any logic to the port that is being listened.

Describe alternatives you've considered
This is core feature of potku-console and it must be implemented somehow.

Additional context
Actual TCP communication with Minecraft client will be handled in issue #49.

Update contribution

Change description
Update the contribution file to reflect commit message policy and wiki contribution policy.

File and section to be updated
https://github.com/softgitron/potku-console/wiki/Contribution#working-on-an-issue
add https://github.com/softgitron/potku-console/wiki/Contribution#wiki-contributions

Problem with current form
Commit messages should be standardized with the issue numbed from the branch and general commit message guidelines should be given to increase commit message quality. There are no guidelines regarding wiki usage.

Design UML class diagram for the core

Describe the supposed addition
Potku-console is fairly complex project and it is quite hard to understand how especially the core works. That is why, it would be good idea to design class diagram that would include most important classes of the core component.

Pitch your addition with a user story
As a developer I can understand basic principles of the architecture with single glance, so that I can code more easily.

Name of the files or sections to be added

Additional context
This issues was processed in a slightly bad manner, since first version of the core class diagram was already available before the issue was opened. However I thought it would still be good to raise official issue for this matter, so that it will be absolutely clear for everyone, when the core architecture of this application is ready.

Add preliminary support for POST /services/{serviceId}/servers

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can add new servers using REST API, so that I don't have to issue SQL statement manually.

Describe the solution you'd like
This issue concentrates on implementing POST /services/{serviceId}/servers endpoint that is used for creating new servers for the service. Because this is only a preliminary support for new services, only subset of features must be supported. Before this issue can be closed, following requirements should be fulfilled:

  • One new server can be added to the service
  • First added server must be primary server
  • State must be either stopped or started
  • All information fields should be always populated
  • State must reflect service state. If service is started also server must be started and so on
  • Service specific configuration must be validated

This issue does NOT address the following requirements:

  • Permission table content is evaluated during API call
  • Uninitialized state must be supported

Describe alternatives you've considered
There are no alternatives. This endpoint must be implemented, so that servers can be added to the services.

Additional context
Validating service specific configuration might be tricky and need separate library for the validation. Check if something like OAS3 can be used for the purpose.

GCP module, add support for POST /servers/machine

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a potku-console core I can start and stop servers using GCP module's APIs, so that I don't have to communicate with GCP directly.

Describe the solution you'd like
I want that GCP module can understand and acknowledge core's request. During resolution of this issue it is not necessary yet implement any functionality for the endpoint. Functionality will be added in the separate requests.

Describe alternatives you've considered
This is mandated by specification so there are no alternatives.

Additional context
Full support for /servers/machine requires implementation of issues #55, #56 and #57.

Create Docker configurations for the project

Is your feature request related to a problem? Please describe.
Not related to a problem.

Pitch your idea with a user story
As a user I can run the application in Docker container, so that I don't have to bloat my Linux installation with dependencies.

Describe the solution you'd like
Project should have Dockerfile that packs the application into Docker container and possibly separate script that can be used for starting the container. During creation of the docker configurations, following requirements should be taken into consideration:

  • Docker container should contain static files like files needed by the core and frontend
  • Docker image should include binaries for Bash, Node and Python so that those languages can be used for module development in the future
  • Docker configurations should include docker volume that is used for storing SQLite database and module files

Describe alternatives you've considered
Docker is not strictly necessary for this application, but it would make installation a lot easier. Alternatively this application could be also packed into VM image, but that could waste a ton of precious resources that are needed by this application.

Add preliminary support for GET /services/{serviceId}/servers/{serverId}/serverCredentials

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can retrieve server credentials from the REST API, so that I don't have to receive them manually from SQL database.

Describe the solution you'd like
This issue concentrates on implementing GET /services/{serviceId}/servers/{serverId}/serverCredentials endpoint that is used for retrieving (SSH) credentials of the server. During creation of this feature following requirements should be fulfilled:

  • Specific server credentials can be retrieved based on the service ID and server ID that are supplied in the path

This issue does NOT address the following requirements:

  • Permission table content is evaluated during API call

Describe alternatives you've considered
This endpoint is not absolutely required for most basic service modules, but more advanced modules heavily lean on this feature, so it must be implemented at some point.

Configure initial CI pipeline

Is your feature request related to a problem? Please describe.
Most of the problems in the new code can be found using code review. However it is possible that some regressions will go unnoticed, if automated test cases are not run. That is why it would be important to have a proper CI pipeline for this project.

Pitch your idea with a user story
As a developer I can receive test results and builds automatically, so that I can be sure that my feature did not break anything.

Describe the solution you'd like
I would like to have basic CI-pipeline that can be used for building the application and running the test cases automatically, so that I would have peace of mind during merging process. At least following requirements should be fulfilled by the CI-pipeline:

  • Application must be build automatically by the pipeline
  • Application should be tested automatically and the test results should be available in the PRs

In addition above features CI-pipeline could have following features:

  • Automatic style checking
  • Automatic security checking
  • Sonar Qube checks
  • Automatic building of the documentation

Because these extra features will most likely include ton of work, it could be good idea to raise separate issues for additional requirements. To close this issue it is sufficient that first two requirements are fulfilled.

Describe alternatives you've considered
CI-pipeline is not absolutely necessary, but it makes development and merging process slightly easier, so it is certainly a good tool to have in the active toolbox.

Additional context
Building #21 and Docker configurations #26 are somewhat related to this case.

Add preliminary support for POST /modules/cloudModules/{cloudModuleUuid}/accounts

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can create new cloud module credentials using REST API, so that I can add easily my personal credentials for cloud module.

Describe the solution you'd like
This issue concentrates on implementing POST /modules/cloudModules/{cloudModuleUuid}/accounts endpoint that is used for creating new cloud module accounts. During creation of this feature following requirements should be fulfilled:

  • One new account can be added to cloud module
  • Cloud account specific configuration is validated based on the cloud module provided schema.

This issue does NOT address the following requirements:

  • Permission table content is evaluated during API call
  • Multiple accounts can be added to cloud module (this can be optionally implemented)

Describe alternatives you've considered
There are no alternatives. This endpoint must be implemented, so that accounts can be attached into cloud modules.

Additional context
Implementing this API can be complex if there is no existing example for validating module specific configuration. However it is very likely that during implementation of this feature there is already such example already available.

Implement modules startup sequence

Is your feature request related to a problem? Please describe.
Not related to an issue.

Pitch your idea with a user story
As user I expect that modules discuss automatically during startup, so that I don't have to work as interpreter for the modules.

Describe the solution you'd like
Based on the issue #23 specification and core class diagram there should be a way to startup modules in automated fashion. This issue is basically used for tracking implementation progress of the issue #23.

Describe alternatives you've considered
Technically module startup sequence is not absolutely required, but without any handshaking procedures, communication between core and modules would be totally insecure. In my opinion, this feature must be implemented, so communication between core and modules would be logical.

Additional context
This issue is also related to #24 and #25.

Add initial IPC library specification

I would like to set up initial documentation to begin defining the library on how different modules of the program can communicate with each other.

As a developer I can help create and improve the documentation about the upcoming IPC library, so that clear and usable standards for it can be set before any programming is started,

The name of the to-be-added file will be "Module communication framework" and it will recieve a dedicated section on the wiki, under which more detailed documentation of the individual parts will be located.

GCP module, add support for GET queries/health

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a potku-console core I can retrieve GCP module's heartbeat, so that I complete startup sequence properly.

Describe the solution you'd like
This is really simple and straightforward feature, but it is important that the feature is implemented. GET queries/health is used for checking health of the service module. Only thing that module should done is to send back HTTP 200 response to the core. Simple as that.

Describe alternatives you've considered
This is required by core specification so there are no alternatives unless specification is altered.

Additional context
It could be good idea to implement this feature first, before tackling with any other issues. Minecraft module has similar issue #51.

Remove the redundant security workflow

Due to missing project requirements, the currently used security workflow is unable to be used and thus, is redundant.

As such, I request for it to be removed until suitable dependencies in Docker container build requirements are met.

Minecraft module, add support for communicating with game client during trigger event

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a game client I can communicate with trigger, so that I don't get wrong impressions about service status.

Describe the solution you'd like
I want that Minecraft module is able to communicate with the game and notice when player is about to join. During this issue it is not yet required to send any API requests to the core. Sensing game state is sufficient.

Describe alternatives you've considered
This is core feature of potku-console and it must be implemented somehow.

Additional context
Implementation of this issue can start only after issue #48 has been closed.

Investigate and add OpenAPI generated core code

Is your feature request related to a problem? Please describe.
This is not related to a problem.

Pitch your idea with a user story
As a developer I generate REST API definitions automatically using OpenAPI Rust code generator, so that I don't have to write all those thousand structures manually.

Describe the solution you'd like
I think, it would be good idea try to generate REST API code automatically for core based on the API definitions and investigate if the generated code is usable for the project. If the code is good, generated code should be uploaded to the repository and connected into core in a fashion that makes it possible to auto generate API definitions in the future again. So before this task can be closed, following tasks should be completed:

  • Generate REST API based on the OpenAPI definition files
  • Investigate is the generated code feasible for the project
  • Push generated code into repository

Describe alternatives you've considered
Naturally alternative for automatic generation is manual coding, witch is a lot more time consuming. If the code generation quality is good enough, this should be perfect option for kick starting REST API development on core side.

Additional context
It would be awesome if the REST API code generation could be automated in the build script (#21), so changes in API definitions would be directly included in the code.

Add preliminary support for POST /users/login

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can acquire token for the REST API, so that I don't have to issue new tokens insecurely on the client side.

Describe the solution you'd like
This issue concentrates on implementing POST /users/login endpoint that is used for issuing new tokens for the users based on the provided credentials. During creation of this feature following requirements should be fulfilled:

  • If the username and password are correct, JWT token should be returned

This issue does NOT address the following requirements:

  • Permission table content is evaluated during API call
  • Two factor authentication is supported

Describe alternatives you've considered
There are no alternatives. There must be some method that can be used for acquiring tokens that can be used for issuing other API requests.

Additional context
Some JWT library is needed for this request. Good starting point for library search could be jsonwebtoken library.

Minecraft module, add support for kicking game client during trigger event

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a game client I can get kick message from trigger, so that I don't have to show unclear error messages for players.

Describe the solution you'd like
Minecraft module works sufficiently without implementing this feature. However using kick commands a lot better user experience could be provided for players. In order to implement kick command properly whole Minecraft handshake protocol must be completed. This is moderately complex, but should be doable.

Describe alternatives you've considered
This feature can be left unimplemented if necessary.

Additional context
Implementation of this issue can start only after issues #48 and #49 has been closed.

Add preliminary support for GET /modules/cloudModules/{cloudModuleUuid}/accounts/{cloudAccountId}

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can retrieve cloud module credentials using REST API, so that I can use those credentials in my cloud module.

Describe the solution you'd like
This issue concentrates on implementing GET /modules/cloudModules/{cloudModuleUuid}/accounts/{cloudAccountId} endpoint that is used for retrieving cloud account credentials. During creation of this feature following requirements should be fulfilled:

  • Cloud module credentials can be retrieved

This issue does NOT address the following requirements:

  • Permission table content is evaluated during API call

Describe alternatives you've considered
There are no alternatives. This endpoint must be implemented, so that cloud modules can log into cloud services.

Additional context
In the future there might be a need to create some kind of extra encryption for these credentials so they won't accidentally leak.

Add installation instructions

Describe the supposed addition
Installation instruction should be added at some point after basic project infrastructure has settled so that users can understand, how to install this program. Some quick instructions could be added to README.md, but more throughout instructions should be written to wiki.

Pitch your addition with a user story
As a user I can install the application, so that I can automatically shutdown and startup my game server.

Name of the files or sections to be added

Additional context
This issue was mentioned as TODO in #14 issue.

Convert database design into Diesel compatible SQL files

Is your feature request related to a problem? Please describe.
This issue is not related to a problem, instead it is a missing feature.

Pitch your idea with a user story
As a developer I can use SQLite database without much effort, so that I concentrate on writing logic for the application.

Describe the solution you'd like
I would like to see database design in a Diesel ORM compatible format so that database can be used with ease during creation of the logic behind endpoints.

Describe alternatives you've considered
There are multiple ORM libraries for the Rust, but Diesel seems to be most popular and it feels very professional ORM, since it includes functionalities for upgrading and downgrading the database. I think Diesel is a good choice, but there might be even better alternatives. It could be a good idea to discuss about this choice, since it effects greatly development of this application.

Additional context
Current database design can be found from the Database diagram-wiki page. Design of the database should be first discussed and approved, before implementation of this issue can be started.

Create first integration test

Is your feature request related to a problem? Please describe.
Programs tend to break easily when they are not tested constantly and broadly. This issue tries to mitigate that by bootstrapping integration testing.

Pitch your idea with a user story
As a maintainer I can run automated test integration tests, so that I don't have to test the whole application manually with Curl every time.

Describe the solution you'd like
Rust has build in support for integration tests. Clean and expandable HTTP integration test framework should be designed and added into application. This issue covers only creation of the first integration test(s). Following integration tests should be created during feature development. Integration test framework has following requirements:

  • Developer must be able to run integration tests using Rust standardized integration test utilities
  • Integration tests must be easy to read and extensible

Describe alternatives you've considered
There are ton of libraries like that can be used for creating integration tests. Rust's build in framework might not be most fitting for the case, but its main extra value is that it is nicely integrated into language itself. If someone is eager to compare and find better integration test framework for HTTP requests, work would be greatly appreciated.

Additional context
Fist unit tests are created during creation of the skeleton structure #17.

Add preliminary support for GET /services/{serviceId}/servers

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can create new server from REST API, so that I don't have to issue direct SQL requests.

Describe the solution you'd like
This issue concentrates on implementing GET /services/{serviceId}/servers endpoint that is used for receiving information about servers that are under one endpoint. During creation of this feature following requirements should be fulfilled:

  • List of one server can be received based on the service when issuing command.
  • (optional) list of all servers under one service can be retrieved

This issue does NOT address the following requirements:

  • Permission table content is evaluated during API call

Describe alternatives you've considered
There are no alternatives. This issue must be resolved before potku-console can be used with any sense.

Additional context
Support for multiple servers is not required for MVP, but it should be fairly easy to implement in GET call. It might be good idea to support getting multiple servers even during initial implementation.

Design module package structure

Describe the supposed addition
Modules should have predetermined package structure that includes manifests that are read by the core for acquiring details like module capabilities and module's configuration structure in OpenAPI format. In addition to manifest files package should naturally include executable that will be started by the core. This design is necessary, so that modules can be loaded in a standardized fashion by the core.

Pitch your addition with a user story
As a [role] I can [capability], so that [receive benefit]
As a developer I can load module in a standardized fashion, so that I don't have to train AI model that guesses, how module configuration structure is laid out.

Name of the files or sections to be added
A name of the proposed files, or links to the files to receive a new section and the section names.

  • Add section in the wiki under architecture and add mention of this page into module creation instructions (See issue #22).

Additional context
This is heavily related to issue #23

Add filtering support for GET /services

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a module developer I can filter list of services, so that I don't have to filter services in my module manually.

Describe the solution you'd like
By resolving this issue support for filtering /services content is added. Before this issue can be resolved issue #33 must be closed. This issue has following requirements:

  • Services can be filtered based on the port
  • Services can be filtered based on the DNS
  • Services can be filtered with both port and DNS

This issue does NOT address the following requirements:

  • Permission table content is evaluated during the API call

Describe alternatives you've considered
In theory this issue is not absolutely necessary to get solved. However if this issue is not solved, it would cause clear extra effort for module developers.

Additional context
See issue #33 for basic implementation.

Add pleriminary support for GET /services

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can receive list of services from REST API, so that I don't have issue direct SQL request.

Describe the solution you'd like
Resolving this issue adds basic support for GET /services endpoint. Following requirements should be fulfilled, before this issue can be closed:

  • User with administrator level rights must be able to receive list of all services using GET /services API call

This issue does NOT address the following requirements:

  • Permission table content is evaluated during call
  • Port and DNS filters can be used during the call

Describe alternatives you've considered
There are no alternatives. This issue must be resolved before potku-console can be used with any sense.

Additional context
This is likely one of the first API calls that will get implemented, so there might be some extra effort required during implementation of this API call.

Add preliminary support for POST /services

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can create new service from REST API, so that I don't have to issue direct SQL requests.

Describe the solution you'd like
This issue concentrates on implementing Post /services endpoint that is used for creating new services. During creation of this feature following requirements should be fulfilled:

  • New services can be created when POST /services is issued
  • Service module triggers must be updated if the service status is stopped
  • Only "stopped" and "started" states should be supported
  • It should be verified that DNS is unique for every service (most likely can be checked automatically on the SQL server level
  • Shared network should not be supported yet and it should be always false
  • Service specific configuration must be validated based on the schema that was provided by the service module

This issue does NOT address the following requirements:

  • Permission table content is evaluated during API call

Describe alternatives you've considered
There are no alternatives. This issue must be resolved before potku-console can be used with any sense.

Additional context
Validating service specific configuration might be tricky and need separate library for the validation. Check if something like OAS3 can be used for the purpose.

Implement core skeleton structure

Is your feature request related to a problem? Please describe.
This issue is not related to a problem, instead it is a missing feature.

Pitch your idea with a user story
As a developer I can see core component's basic structure so that I can understand where to place my next 10k commit.

Describe the solution you'd like
In the initial skeleton structure of the project most important architectural features like main classes and some initial data structures should be visible. At least project should include skeletons for all the classes that are defined in the class diagram. In addition to content requirements skeleton project should be compilable by Rust's compiler and include model for a unit test.

Describe alternatives you've considered
Alternative to this kind of wide skeleton structure solution would be tall specific feature implementation. In my opinion this kind of skeleton structure is still better option for a large scale project like this, so that projects main construction is visible from the start.

Additional context
This issues should be solved before any other code is added to the core.

Implement issues for documentation and repository enhancement

Issue
Currently changing documentation and meta-issues (workflow and repository configuration) needs to go through bug reports or feature suggestions.

User story
As a contributor I can create issues regarding documentation and the repository specifically, so that issues are better organized

Proposed solution
Implement two issue templates: update-documentation and add-documentation, mirroring bugs and feature requests, but on documentation side. Implement an issue template for repository enhancements. Create corresponding labels.

Alternative solutions
1: Use bugfixes and feature requests instead of specific issue templates.
2: Create only one issue template for both changing and adding documentation and leave repository updates to use feature requests and bug fixes.

Add preliminary support for POST /users

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can create new users using REST API, so that I don't have to create using raw SQL statements.

Describe the solution you'd like
This issue concentrates on implementing POST /users endpoint that is used for creating new users. During creation of this feature following requirements should be fulfilled:

  • New user is created when request is made
  • New user must be always administrator
  • Two factor secret should be always empty
  • Password should be hashed, before it is added to the database

This issue does NOT address the following requirements:

  • Permission table content is evaluated during API call
  • Non administrator users can be created
  • Two factor authentication is supported

Describe alternatives you've considered
This is a critical endpoint that must be supported, so new users can be created and controlled.

Set up Visual Studio Code workspace

Is your feature request related to a problem? Please describe.
Visual Studio Code needs additional configuration to work well with repositories that contain source code for multiple binaries. This should be resolvable by creating Visual Studio Code workspace configuration.

Pitch your idea with a user story
As a developer I can program different components using Visual Studio Code in a workspace, so that I don't have to jump between different folders with all the time with the code.

Describe the solution you'd like
I would like to have Visual Studio Code workspace configuration that would automatically setup the project nicely in VS code so I can concentrate on coding. In addition I would like to have debugger pre configured, so that I don't have to create those configurations by myself from the scratch when I open the project.

Describe alternatives you've considered
I could use another IDE, but Visual Studio Code is my favorite.

Additional context
This issues should be resolved, after basic project structure has settled.

Add preliminary support for PUT /services/{serviceId}/servers/{serverId}/serverCredentials

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can update or add server credentials from the REST API, so that I don't have to create or update them manually using SQL commands.

Describe the solution you'd like
This issue concentrates on implementing PUT /services/{serviceId}/servers/{serverId}/serverCredentials endpoint that is used for creating and updating (SSH) credentials of the server. During creation of this feature following requirements should be fulfilled:

  • New credentials can be attached to the server
    • Existing credentials are updated with new credentials

This issue does NOT address the following requirements:

  • Permission table content is evaluated during API call

Describe alternatives you've considered
This endpoint is not absolutely required for most basic service modules, but more advanced modules heavily lean on this feature, so it must be implemented at some point.

Add preliminary support for POST /services/{serviceId}

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can start and stop service from REST API, so that I don't have to create my own request for cloud providers.

Describe the solution you'd like
This issue concentrates on implementing POST /services/{serviceId} endpoint that is used for starting, stopping and re-configuring existing services. During creation of this feature following requirements should be fulfilled:

  • New desired state (started or stopped) must trigger appropriate calls for starting or stopping a service using cloud module APIs
  • Service module triggers must be updated based on the new state.

This issue does NOT address the following requirements:

  • Permission table content is evaluated during API call
  • Basic details of the service can be altered

Describe alternatives you've considered
There are no alternatives. This endpoint must be implemented, so that services can be started and stopped.

Additional context
Implementing this API call can be complex, because it must interact heavily with cloud and service modules.

GCP module, add support for authenticating against GCP

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a cloud module I can authenticate against Google Cloud Platform APIs, so that I can issue API calls to GCP.

Describe the solution you'd like
Before virtual machines can be started or stopped, it is necessary to gain authentication token for the GCP. After this issue is closed GCP module should be able to authenticate against GCP using core provided credentials for example during POST /servers/machine API call.

Describe alternatives you've considered
Some kind of authentication is mandatory against GCP, so there are no alternatives.

Additional context
This issue is continuation to issue #54.

Restructure the wiki to be able to render subsections

Remodel the Wiki's visual structure to allow subsections to be displayed inside the navigation sidebar.

As a developer I can use dedicated wiki subsections to link related data together, so that searching the documentation of related articles is vastly improved.

For example, with subsections, different parts of the IPC library can all be located under one section without flooding the wiki's homepage or navigation bar.

Set up a basic directory structure for the project

The project needs a clear and consistent directory structure to put related files into context.

As a developer I can find important and relevant files to code I am working with more easily, so that I can advance the project more swiftly.

I propose a directory structure which can be found in the attached pull request.

There are no alternative solutions as the project must have a clear directory structure.

Add preliminary support for GET /modules/cloudModules

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a developer I can retrieve information about cloud modules using REST API, so that I don't have to dig cloud module details from database.

Describe the solution you'd like
This issue concentrates on implementing GET /modules/cloudModules endpoint that is used for retrieving information about cloud modules. During creation of this feature following requirements should be fulfilled:

  • List of all cloud modules information can be retrieved

This issue does NOT address the following requirements:

  • Permission table content is evaluated during API call

Describe alternatives you've considered
There are no alternatives. This endpoint must be implemented, so that cloud module account can be logically linked to specific cloud module.

Additional context
Implementing this issue might be slightly tricky, because lot of cloud module information must be received from the data store.

Implement modules loading

Is your feature request related to a problem? Please describe.
This is a feature request.

Pitch your idea with a user story
As a [role] I can [capability], so that [receive benefit]
As a user I can load modules via core, so that I don't have start them manually.

Describe the solution you'd like
This issue is highly related to issue #24 and should follow its design in initial module loading. As described in the UML core class diagram core should have classes that are capable for loading external cloud and service modules. Idea of this issue is to implement functionality that makes it possible to load module configurations and start modules process. Startup sequence and handshake process itself is handled in the separate issue. Module loading has following requirements that should be fulfilled:

  • Core must be able to find module files from certain folder structure like: /{module_name}/module_manifest.json
  • Core must be able to read and parse module configurations
  • Core must be able to store those configurations temporally in memory
  • Module configurations must be readable by classes that implement REST-API calls
  • Core must be able to check from database weather module should be loaded or not
  • Core must be able to start and stop module process when appropriate functions are called
  • Core must be able to physically start process and set appropriate permissions for the process.

Describe alternatives you've considered
An alternative is that modules are always loaded manually. This is cumbersome experience for the user and almost impossible to done when application is run inside container. In my opinion there are now alternatives for good UX.

Additional context
See issue #24 and #23.

Desing build script

Is your feature request related to a problem? Please describe.
No this is missing feature.

Pitch your idea with a user story
As a developer I can compile whole project with a single command, so that I don't have to different pieces one by one.

Describe the solution you'd like
This project consists of multiple pieces that needs compilation. Cargo and Rust compiler handles nicely single modules, but it is very cumbersome to compile all the modules one by one manually. To avoid ton of redundant work there should be centralized build script that can compile different modules and pack them nicely into build folder.

Traditionally GNU Make has been used for the task, but at least in my opinion tools syntax is so horrible that it makes simple build automation total horror process. That is why I would like to see some other tool to be used for this purpose. I think Python with SCons could be one good option, but it is up for the implementer, what language and tool will be used in the end, but NOT Make please (:

Ultimate statement perfect jack of all trades is not required for this project. Any script that works and is sufficiently clear is fine for this project.

Connect SQLite database to core

Is your feature request related to a problem? Please describe.
Not a problem, just a feature.

Pitch your idea with a user story
As a user I can save my configurations, so that I don't have to configure potku-console again during every start.

Describe the solution you'd like
According to class diagram core should have class that is responsible for database connections. Based on the issue #18 connection should be establish using Diesel ORM. This issue has following requirements:

  • Core must be able to connect to SQLite database using Diesel ORM
  • Establish connection must be easily usable by classes that implement REST interface.

Describe alternatives you've considered
In theory potku-console could have file based configuration storage, but in reality some kind of database is a lot better choice. So not there are no alternatives.

Additional context
See wiki for SQL database design and issue #18 for information about Diesel configuration.

Add Code of Conduct, Contribution and Pull request template

User story
As a developer I can provide clear documentation to collaborators, so that collaboration with developers outside of the main project team becomes easier.

Describe the solution you'd like
We already have an excellent code of conduct and good enough contribution guidelines in the wiki, but github doesn't recognize them. Add md files into root with links to wiki. Create a pull request template adhering to the contribution guidelines.

Describe alternatives you've considered
No described resources wouldn't really be an end of the world but this way seems preferable to me

Generate REST documentation based on the OpenAPI definitions

Describe the supposed addition
OpenAPI definitions can be used for automatic documentation creation. I suggest that Github sites would be enabled in this repository and docs folder would include server that could render OpenAPI specifications. Documentation for all three (core, cloud module, service module) APIs should be generated as part of this issue.

Pitch your addition with a user story
As a developer I can read API documentation from the wiki, so that I don't always have to copy and paste OpenAPI configurations into Swagger editor.

Name of the files or sections to be added
I think, wiki should contain page that would have links for different API specification.

Additional context
These repositories could be good starting points, when investigating this issue: Swagger github pages and Swagger UI. In the future it would be very cool, if documentation could be generated automatically as a part of the CI pipeline.

Minecraft module, add support for GET queries/health

Is your feature request related to a problem? Please describe.
No, this is not related to an existing problem.

Pitch your idea with a user story
As a potku-console core I can retrieve Minecraft modules heartbeat, so that I complete startup sequence properly.

Describe the solution you'd like
This is really simple and straightforward feature, but it is important that the feature is implemented. GET queries/health is used for checking health of the service module. Only thing that module should done is to send back HTTP 200 response to the core. Simple as that.

Describe alternatives you've considered
This is required by core specification so there are no alternatives unless specification is altered.

Additional context
It could be good idea to implement this feature first, before tackling with any other issues.

Add initial instructions for creating new modules

Describe the supposed addition
Due to modular nature of this project, 3rd party developers may create their own modules for the potku-console in the future. Currently 3rd party modules are not yet very feasible, but documentation how to create modules would be great since, it would define more clearly, how modules should work with the core. Instructions for creating modules could become quite expensive so it could be good idea to create own section in the wiki for module creation. In order to close this issue it is not required to write about every possible details that could be needed for creating new modules. Instead it is sufficient that basic details of the module development is written down in the wiki.

Pitch your addition with a user story
As a 3rd party developer I can access module creation documentation in the wiki, so that I can create my own modules with ease.

Name of the files or sections to be added

  • Add section "Creating new modules" with own sub sections for service modules and cloud modules.

Add initial API specification

Is your feature request related to a problem? Please describe.
This issue is not related to a problem, instead it is missing core functionality.

Pitch your idea with a user story
As a developer I can interact with core from the module so that I don't have to implement everything again in the module.

Describe the solution you'd like
I would like to have clear OpenAPI schema file that describes the API.

Describe alternatives you've considered
There are no alternatives, this application must have API.

Additional context
No additional context.

Add proper Readme for the project

Describe the supposed change
Current readme is not informative enough for outsider to understand anything about this project. Readme should be updated to include at least most important aspect and proper description of this project.

File and section to be updated
README.md

Problem with current form
There isn't enough information in the Readme to gather any valuable insights.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.