Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions takeoff/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# Autogenerated files
*.g.dart
*.gr.dart
*.mocks.dart
takeoff_cli/bin/takeoff_cli.exe
42 changes: 42 additions & 0 deletions takeoff/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "takeoff_cli",
"cwd": "takeoff_cli",
"console": "terminal",
"request": "launch",
"type": "dart",
"program": "bin/takeoff_cli.dart"
},
{
"name": "takeoff_gui",
"cwd": "takeoff_gui",
"request": "launch",
"type": "dart"
},
{
"name": "takeoff_gui (profile mode)",
"cwd": "takeoff_gui",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
},
{
"name": "takeoff_gui (release mode)",
"cwd": "takeoff_gui",
"request": "launch",
"type": "dart",
"flutterMode": "release"
},
{
"name": "takeoff_lib",
"cwd": "takeoff_lib",
"request": "launch",
"type": "dart"
}
]
}
27 changes: 27 additions & 0 deletions takeoff/_docs/diagrams/commands_diagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@startmindmap CommandsName
<style>
mindmapDiagram {
done {
BackgroundColor lightGreen
}
progress {
BackgroundColor orange
}
notDone {
BackgroundColor #FF7276
}
}
</style>
* takeoff
** gc <<done>>
*** create <<done>>
*** run <<done>>
*** init <<done>>
*** list <<done>>
*** clean <<done>>
** aws <<notDone>>
** azure <<notDone>>
** quickstart <<progress>>
*** wayat <<progress>>
*** viplane <<notDone>>
@endmindmap
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions takeoff/_docs/diagrams/component_diagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@startuml Component_Diagram
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
!define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/devicons
!define FONTAWESOME https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/font-awesome-5
!include DEVICONS/angular.puml
!include DEVICONS/java.puml
!include DEVICONS/msql_server.puml
!include FONTAWESOME/users.puml
!define osaPuml https://raw.githubusercontent.com/Crashedmind/PlantUML-opensecurityarchitecture2-icons/master
!include osaPuml/Common.puml
!include osaPuml/User/all.puml

!include <office/Servers/database_server>
!include <office/Servers/file_server>
!include <office/Servers/application_server>
!include <office/Concepts/service_application>
!include <office/Concepts/firewall>
left to right direction

AddContainerTag("db", $sprite="database_server", $legendText="database container")


Person(user, "User", "Interacts with the GUI and CLI to create/deploy on Cloud environments", $sprite="users")
Container_Ext(hangar_cont, "Hangar Container", "Docker","Contains all the hangar scripts and the tools to interact with the Cloud services")

System_Boundary(c1, "TakeOff") {
Container_Boundary(takeoff_gui, "TakeOff GUI") {
Component(gui, "GUI", $techn="Flutter", $descr="Receives the inputs from the user and calls the appropriate logic")
Component(shared_libary_gui, "Shared business logic library", $techn="Dart package", $descr="Shared package with logic library for both the CLI and GUI")

}
Container_Boundary(takeoff_cli, "TakeOff CLI") {
Component(cli, "Input Controller", $techn="dart", $descr="Reads the console commands to determine which scripts should be executed")
Component(shared_libary_cli, "Shared business logic library", $techn="Dart package", $descr="Shared package with logic library for both the CLI and GUI")

}

ContainerDb(cache, "Cache Store", "Stores user configuration", $tags="db")
}

Rel(cli, gui, "can launch")
Rel(user, gui, "Uses", "GUI")
Rel_Right(user, cli, "Uses", "CLI")
Rel(gui, shared_libary_gui, "calls")
Rel(cli, shared_libary_cli, "calls")
Rel(shared_libary_cli, hangar_cont, "Executes commands", "Docker CLI")
Rel(shared_libary_gui, hangar_cont, "Executes commands", "Docker CLI")
Rel_Right(shared_libary_cli, cache, "stores/writes")
Rel_Right(shared_libary_gui, cache, "stores/writes")
@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions takeoff/_docs/diagrams/container_diagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@startuml Container_Diagram
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/devicons
!define FONTAWESOME https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/font-awesome-5
!include DEVICONS/angular.puml
!include DEVICONS/java.puml
!include DEVICONS/msql_server.puml
!include FONTAWESOME/users.puml
!define osaPuml https://raw.githubusercontent.com/Crashedmind/PlantUML-opensecurityarchitecture2-icons/master
!include osaPuml/Common.puml
!include osaPuml/User/all.puml

!include <office/Servers/database_server>
!include <office/Servers/file_server>
!include <office/Servers/application_server>
!include <office/Concepts/service_application>
!include <office/Concepts/firewall>
AddContainerTag("db", $sprite="database_server", $legendText="mounted volume")


Person(user, "User", "Interacts with the GUI and CLI to create/deploy on Cloud environments", $sprite="users")
Container_Ext(hangar_cont, "Hangar Container", "Docker","Contains all the hangar scripts and the tools to interact with the Cloud services")

System_Boundary(c1, "TakeOff") {
Container(flutter_gui, "TakeOff GUI", "Flutter GUI","Simplifies the interaction with TakeOff logic wrapping everything in a UI")
Container(dart_cli, "TakeOff CLI", "Dart CLI","Gets command-line arguments and executes the appropiate scripts against the Hangar container")
ContainerDb(file_cache, "Cache Store", "Stores user configuration", $tags="db")
}

System_Ext(google, "Google Cloud", "Cloud provider")
System_Ext(azure, "Azure", "Cloud provider")
System_Ext(aws, "AWS", "Cloud Provider")

Rel(user, flutter_gui, "Uses", "GUI")
Rel(user, dart_cli, "Uses", "CLI")
Rel(dart_cli, hangar_cont, "Executes commands", "Docker CLI")
Rel(flutter_gui, hangar_cont, "Executes commands", "Docker CLI")
Rel(dart_cli, file_cache, "stores/writes")
Rel(flutter_gui, file_cache, "stores/writes")

Rel(hangar_cont, google, "uses", "HTTPS")
Rel(hangar_cont, aws, "uses", "HTTPS")
Rel(hangar_cont, azure, "uses", "HTTPS")
@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions takeoff/_docs/diagrams/context_diagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@startuml Context_Diagram
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/devicons
!define FONTAWESOME https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/font-awesome-5
!include DEVICONS/angular.puml
!include DEVICONS/java.puml
!include DEVICONS/msql_server.puml
!include FONTAWESOME/users.puml

' LAYOUT_WITH_LEGEND()

Person(user, "User", "Interacts with the GUI and CLI to create/deploy on Cloud environments", $sprite="users")
System(take_off, "TakeOff", "GUI & CLI program to Create / Manage Cloud Projects")
Container_Ext(hangar_cont, "Hangar Container", "Docker","Contains all the hangar scripts and the tools to interact with the Cloud services")

System_Ext(google, "Google Cloud", "Cloud provider")
System_Ext(azure, "Azure", "Cloud provider")
System_Ext(aws, "AWS", "Cloud Provider")

Rel(user, take_off, "Uses", "CLI / GUI")
Rel(take_off, hangar_cont, "Executes commands", "Docker CLI")
Rel(hangar_cont, google, "uses", "HTTPS")
Rel(hangar_cont, aws, "uses", "HTTPS")
Rel(hangar_cont, azure, "uses", "HTTPS")
@endum
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions takeoff/_docs/diagrams/dynamic_diagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
@startuml Dynamic_Diagram
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/devicons
!define FONTAWESOME https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/master/font-awesome-5
!include DEVICONS/angular.puml
!include DEVICONS/java.puml
!include DEVICONS/msql_server.puml
!include FONTAWESOME/users.puml
!define osaPuml https://raw.githubusercontent.com/Crashedmind/PlantUML-opensecurityarchitecture2-icons/master
!include osaPuml/Common.puml
!include osaPuml/User/all.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
!include <office/Servers/database_server>
!include <office/Servers/file_server>
!include <office/Servers/application_server>
!include <office/Concepts/service_application>
!include <office/Concepts/firewall>
AddContainerTag("db", $sprite="database_server", $legendText="database container")
left to right direction

' LAYOUT_WITH_LEGEND()

Person(user, "User", "Interacts with the GUI and CLI to create/deploy on Cloud environments", $sprite="users")
System_Boundary(s_takeoff, "TakeOff") {
Container_Boundary(takeoff_gui, "TakeOff GUI") {
Component(gui, "GUI", $techn="Flutter", $descr="Receives the inputs from the user and calls the appropriate logic")
}
Container_Boundary(takeoff_cli, "TakeOff CLI") {
Component(cli, "Input Controller", $techn="Dart", $descr="Reads the console commands to determine which scripts should be executed")
}

Container_Boundary(c_takeoff, "Shared Business logic library"){
Component(façade, "Logic Façade", "Abstraction Layer", "Automation of Hangar scripts")
Component(project_controller, "Project Controller")
Component(repository_controller, "Repository Controller")
Component(account_controller, "Account Controller")
Component(pipeline_controller, "Pipeline Controller")
Component(cache_controller, "Cache Controller")
}

ContainerDb(db, "Cache Store", "User Configuration", $tags="db")
}

System_Boundary(s_hangar, "Hangar") {
Container_Boundary(hangar, "Hangar") {
Component(create_project, "create-project.sh")
Component(setup_sonar, "setup-sonar.sh")
Component(verify_roles, "verify-roles.sh")
Component(setup_service_account, "setup-principal-account.sh")
Component(create_repo, "create-repo.sh")
Component(pipeline_generator, "pipeline-generator.sh")
}


Container_Boundary(hangar_clis, "Cloud CLIs") {
Component_Ext(gcloud, "GCloud CLI")

}

}

System_Boundary(host, "Host OS"){
ContainerDb(dbcli, "CLI Configs", "Self CLI Configuration", $tags="db")
}



System_Boundary(cloud, "Cloud"){
System_Ext(google_cloud, "Google Cloud")
}

Rel(user, gui, "uses")
Rel(user, cli, "uses")

Rel(gui, façade, "calls")
Rel(cli, façade, "calls")

Rel(project_controller, create_project, "Interacts")
Rel(project_controller, setup_sonar, "Interacts")
Rel(account_controller, setup_service_account, "Interacts")
Rel(account_controller, verify_roles, "Interacts")
Rel(pipeline_controller, pipeline_generator, "Interacts")
Rel(repository_controller, create_repo, "Interacts")
Rel_Up(cache_controller, db, "Stores / Reads")

Rel(façade, project_controller, "Uses")
Rel(façade, repository_controller, "Uses")
Rel(façade, account_controller, "Uses")
Rel(façade, pipeline_controller, "Uses")
Rel(façade, cache_controller, "Uses")


Rel(create_project, gcloud, "Interacts")
Rel(setup_sonar, gcloud, "Interacts")
Rel(setup_service_account, gcloud, "Interacts")
Rel(verify_roles, gcloud, "Interacts")
Rel(pipeline_generator, gcloud, "Interacts")
Rel(create_repo, gcloud, "Interacts")

Rel(gcloud, dbcli, "Stores / Reads")

Rel(gcloud, google_cloud, "Communicates with", "HTTPS")

@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions takeoff/_docs/diagrams/quickstart_flow_diagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@startuml QuickstartFlowDiagram
<style>
notDone {
BackgroundColor #FF7276
}
</style>
start
#red:Firebase Login;
:Google login;
#orange:Create project GCloud Flag Firebase;
:Create service account;
:Set up account & add roles;
:Verify roles;
:Activate service account;
:Create repos;
:Set Up Sonarqube;
' Creates a file with the backend cloud run url
#orange: Init Cloud Run Back;
' Creates a file with the frontend cloud run url
#orange: Init Cloud Run Front;
' Generates files for quickstart back & front
' Generates message that tells you to copy a secret from a URL (manual)
' Generates keystore file
#FF7276: Set Up Firebase;
#orange: Quickstart Backend;
' Needs the frontend url
' Needs the secret from the user in set up firebase (manual)
' Needs the keystore file
#red: Quickstart Frontend;
:Set Up backend pipelines;
#orange: Set up frontent pipelines web;
#orange: Set up frontent pipelines android;
#orange: trigger pipelines;

end
@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions takeoff/takeoff_cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Files and directories created by pub.
.dart_tool/
.packages

# Conventional directory for build output.
build/
3 changes: 3 additions & 0 deletions takeoff/takeoff_cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0.0

- Initial version.
2 changes: 2 additions & 0 deletions takeoff/takeoff_cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
A sample command-line application with an entrypoint in `bin/`, library code
in `lib/`, and example unit test in `test/`.
30 changes: 30 additions & 0 deletions takeoff/takeoff_cli/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
Loading