roro 0.3.17 → 0.3.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +108 -70
- data/.gitignore +35 -8
- data/.ruby-version +1 -0
- data/Gemfile +1 -1
- data/Guardfile +23 -13
- data/README.md +11 -11
- data/bin/console +1 -1
- data/bin/setup +1 -1
- data/docker-compose.yml +3 -3
- data/lib/roro/cli/generate/generate.rb +52 -1
- data/lib/roro/cli/generate/generate_containers.rb +23 -0
- data/lib/roro/cli/generate/generate_environments.rb +25 -0
- data/lib/roro/cli/generate/generate_exposed.rb +11 -0
- data/lib/roro/cli/generate/generate_keys.rb +15 -0
- data/lib/roro/cli/generate/generate_mise.rb +13 -0
- data/lib/roro/cli/generate/generate_obfuscated.rb +14 -0
- data/lib/roro/cli/roll_your_own.rb +12 -0
- data/lib/roro/cli/rollon.rb +16 -16
- data/lib/roro/cli.rb +33 -17
- data/lib/roro/common/file_reflection.rb +33 -0
- data/lib/roro/common/utilities.rb +185 -0
- data/lib/roro/configurator.rb +15 -0
- data/lib/roro/configurators/adventure_case_builder.rb +65 -0
- data/lib/roro/configurators/adventure_chooser.rb +46 -0
- data/lib/roro/configurators/adventure_picker.rb +68 -0
- data/lib/roro/configurators/adventure_writer.rb +34 -0
- data/lib/roro/configurators/catalog_builder.rb +17 -0
- data/lib/roro/configurators/configurator.rb +64 -0
- data/lib/roro/configurators/eligibility.rb +141 -0
- data/lib/roro/configurators/question_asker.rb +29 -0
- data/lib/roro/configurators/question_builder.rb +83 -0
- data/lib/roro/configurators/structure_builder.rb +34 -0
- data/lib/roro/configurators/utilities.rb +188 -0
- data/lib/roro/configurators/validator.rb +109 -0
- data/lib/roro/crypto/cipher.rb +35 -0
- data/lib/roro/crypto/exposer.rb +33 -0
- data/lib/roro/crypto/file_writer.rb +14 -0
- data/lib/roro/crypto/key_writer.rb +35 -0
- data/lib/roro/crypto/obfuscator.rb +25 -0
- data/lib/roro/error.rb +31 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/fatsufodo.yml +1 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/django.yml +38 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/Dockerfile.tt +7 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/docker-compose.yml.tt +20 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/requirements.txt.tt +2 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_two/settings.py +130 -0
- data/lib/roro/{cli/templates/base/jumpstart → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_one/dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_one/stage_one_test.rb +37 -0
- data/lib/roro/{cli/templates/base/roro → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_two/dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/expressjs.yml +8 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/templates/stage_one/Dockerfile.tt +14 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/templates/stage_one/docker-compose.yml.tt +21 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/flask.yml +14 -0
- data/lib/roro/{cli/templates/base/roro/roro → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/Dockerfile +11 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/app.py +23 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/docker-compose.yml +8 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/requirements.txt +2 -0
- data/lib/roro/{cli/templates/base/roro/roro/containers → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test}/.keep +0 -0
- data/lib/roro/{cli/templates/base/roro/roro/containers/app → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one}/.keep +0 -0
- data/lib/roro/{cli/templates/base/roro/roro/containers/frontend → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one/stage_dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one/stage_test.rb +37 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/rails.yml +12 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
- data/lib/roro/{cli/templates/rails/.circleci/.keep → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Gemfile.lock.tt} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Gemfile.tt +2 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/docker-compose.yml.tt +9 -0
- data/lib/roro/{cli/templates/rails/roro/roro/docker-entrypoint.sh.tt → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/entrypoint.sh} +1 -1
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_two/database.yml.tt +16 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/wordpress/templates/stage_one/docker-compose.yml.tt +31 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/wordpress/wordpress.yml +17 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/okonomi.yml +1 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/roll_your_own.yml +23 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/%interpolated_story_name%.yml.tt +10 -0
- data/lib/roro/{cli/templates/rails → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/templates/stage_one}/.keep +0 -0
- data/lib/roro/{cli/templates/rails/database/with_postgresql → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test}/.keep +0 -0
- data/lib/roro/{cli/templates/rails/dotenv → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one}/.keep +0 -0
- data/lib/roro/{cli/templates/rails/roro → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one/stage_dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one/stage_test.rb.tt +37 -0
- data/lib/roro/{cli/templates/rails/roro/containers → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/test/stage_one/dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/test/stage_one/stage_one_test.rb +58 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/omakase.yml +1 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/rails.yml +13 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
- data/lib/roro/{cli/templates/rails/roro/containers/app/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/Gemfile.lock.tt} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/Gemfile.tt +2 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/docker-compose.yml.tt +17 -0
- data/lib/roro/{cli/templates/rails/roro/docker-entrypoint.sh.tt → stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/entrypoint.sh} +1 -1
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_two/database.yml.tt +16 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/.env +38 -0
- data/lib/roro/{cli/templates/rails/roro/containers/frontend → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/LICENSE +674 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/README.md +346 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/build.sh +39 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/cfg/nginx-custom-configs.conf +117 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/cfg/nginx-wp-hardening.conf +131 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/tpl/nginx-http.conf.template +103 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/tpl/nginx-https.conf.example +123 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/php.conf.ini +3 -0
- data/lib/roro/{cli/templates/rails/roro/roro/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/data/certbot/conf/.placeholder} +0 -0
- data/lib/roro/{cli/templates/rails/roro/roro/containers/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/data/certbot/www/.placeholder} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-build.yml +24 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-dev.yml +96 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-prod.yml +147 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/dump_mysql.sh +16 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/init_letsencrypt.sh +80 -0
- data/lib/roro/{cli/templates/rails/roro/roro/containers/app/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/mysql-dumps/.placeholder} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/push.sh +22 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress/Dockerfile +14 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress/adduser.sh +15 -0
- data/lib/roro/{cli/templates/rails/roro/roro/containers/frontend/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress-sql/.placeholder} +0 -0
- data/lib/roro/{cli/templates/ruby_gem/.circleci/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress-src/.placeholder} +0 -0
- data/lib/roro/{cli/templates/ruby_gem/roro/containers → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test}/.keep +0 -0
- data/lib/roro/{cli/templates/ruby_gem/roro/keys → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one}/.keep +0 -0
- data/lib/roro/{cli/templates/stories → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one/stage_dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one/stage_test.rb +40 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/wordpress.yml +76 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/fatsufodo.yml +1 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/django.yml +36 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/Dockerfile.tt +7 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/docker-compose.yml.tt +20 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/requirements.txt.tt +2 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_two/settings.py +130 -0
- data/lib/roro/{cli/templates/stories/with_postgresql → stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_one/dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_one/stage_one_test.rb +37 -0
- data/{roro/containers → lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_two/dummy}/.keep +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/expressjs.yml +7 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/templates/stage_one/Dockerfile.tt +14 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/templates/stage_one/docker-compose.yml.tt +21 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/rails.yml +12 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
- data/{roro/keys/.keep → lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Gemfile.lock.tt} +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Gemfile.tt +2 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/docker-compose.yml.tt +17 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/entrypoint.sh +8 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_two/database.yml.tt +16 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/__MACOSX/scripts/._.DS_Store +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/.DS_Store +0 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/bundler.sh +22 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/git.sh +21 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/rvm.sh +38 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/utilities.sh +53 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base.sh +6 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/clone_idea.sh +14 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/clone_repos.sh +33 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/install_correct_bundler.sh +21 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/install_rubies.sh +6 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize.sh +18 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/roro.sh +15 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/source.sh +28 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/bundle_all.sh +12 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/git_pull_all.sh +15 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/rvm_install_all.sh +12 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/yarn_install_all.sh +10 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/wordpress/templates/stage_one/docker-compose.yml.tt +31 -0
- data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/wordpress/wordpress.yml +16 -0
- data/{sandbox → lib/roro/stacks/library/roro}/.keep +0 -0
- data/lib/roro/stacks/library/roro/docker_compose/docker-compose.yml +22 -0
- data/lib/roro/stacks/library/roro/k8s/k8s.yml +15 -0
- data/lib/roro/stacks/library/roro/plots/node/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/node/node.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/php/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/php/php.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/django/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/django/django.yml +10 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/Dockerfile +7 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/docker-compose.yml +20 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/requirements.txt +2 -0
- data/lib/roro/stacks/library/roro/plots/python/plots/flask/flask.yml +0 -0
- data/lib/roro/stacks/library/roro/plots/python/python.yml +1 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/mysql.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/postgres.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails/rails.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails/templates/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_react/rails_react.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_react/templates/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_vue/rails_vue.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_vue/templates/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/rails.yml +16 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/templates/.keep +0 -0
- data/lib/roro/stacks/library/roro/plots/ruby/plots/ruby_gem/ruby_gem.yml +22 -0
- data/lib/roro/stacks/library/roro/plots/ruby/ruby.yml +22 -0
- data/lib/roro/stacks/library/roro/roro/roro.yml +15 -0
- data/lib/roro/stacks/stories_v1/greenfield/rails.yml +9 -0
- data/lib/roro/stacks/stories_v1/greenfield/roro.yml +7 -0
- data/lib/roro/stacks/stories_v1/greenfield.yml +1 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/ci_cd/circleci.yml +2 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/ci_cd.yml +1 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/database/mysql.yml +17 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/database/postgresql.yml +15 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/database.yml +9 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql/default.yml +1 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql/edge.yml +1 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql.yml +10 -0
- data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes.yml +1 -0
- data/lib/roro/stacks/stories_v1/rollon/rails.yml +76 -0
- data/lib/roro/stacks/stories_v1/rollon/roro.yml +5 -0
- data/lib/roro/stacks/stories_v1/rollon/ruby_gem.yml +5 -0
- data/lib/roro/stacks/stories_v1/rollon.yml +42 -0
- data/lib/roro/stacks/stories_v1/templates/rails/.circleci/.keep +0 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/.circleci/config.yml.tt +4 -6
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/.circleci/jobs/_build.yml +4 -6
- data/lib/roro/stacks/stories_v1/templates/rails/.circleci/jobs/_push.yml +11 -0
- data/lib/roro/stacks/stories_v1/templates/rails/.circleci/jobs/_test.yml +12 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/.circleci/setup-gem-credentials.sh +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/.circleci/workflows/_build_test_push.yml +12 -0
- data/lib/roro/stacks/stories_v1/templates/rails/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/Dockerfile.greenfield.tt +51 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/config/database.mysql.yml +0 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/config/database.pg.yml +2 -3
- data/lib/roro/stacks/stories_v1/templates/rails/database/with_mysql/_service.yml +10 -0
- data/lib/roro/stacks/stories_v1/templates/rails/database/with_postgresql/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/database/with_postgresql/_service.yml +7 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/docker-compose.yml.tt +3 -3
- data/lib/roro/stacks/stories_v1/templates/rails/dotenv/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/dotenv/database.mysql.env.tt +6 -0
- data/lib/roro/stacks/stories_v1/templates/rails/dotenv/database.pg.env.tt +4 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/rails/dotenv/web.env.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/kube.rake.tt +114 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/app/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/app/Dockerfile.tt +34 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/frontend/.keep +0 -0
- data/lib/roro/{cli/templates/base/roro/roro/docker-entrypoint.sh.tt → stacks/stories_v1/templates/rails/roro/docker-entrypoint.sh} +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/keys/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/certificate.yml.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/cluster-issuer.yml.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployment.yml.tt +50 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/postgres_deploy.yaml +47 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/rails_deploy.yaml +62 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/redis_deploy.yaml +23 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/sidekiq_deploy.yaml +56 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/ingress.yml.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/ingresses/ingress.yaml +13 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/job-migrate.yml.tt +0 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/jobs/setup.yaml +42 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/secret-digital-ocean.yml.tt +4 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/service.yml.tt +10 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/services/postgres_svc.yaml +13 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/services/rails_svc.yaml +13 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/services/redis_svc.yaml +13 -0
- data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/volumes/postgres_volumes.yaml +25 -0
- data/lib/roro/stacks/stories_v1/templates/roro/containers/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/containers/database/env/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/containers/database/scripts/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/env/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/keys/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/.keep +0 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/bundler.sh +22 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/git.sh +21 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/rvm.sh +38 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/utilities.sh +53 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/base.sh +6 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/clone_idea.sh +14 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/clone_repos.sh +33 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/install_correct_bundler.sh +21 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/install_rubies.sh +6 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize.sh +18 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/roro.sh +15 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/source.sh +28 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/bundle_all.sh +12 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/git_pull_all.sh +15 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/rvm_install_all.sh +12 -0
- data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/yarn_install_all.sh +10 -0
- data/lib/roro/stacks/stories_v1/templates/ruby_gem/.circleci/.keep +0 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/ruby_gem/.circleci/config.yml.tt +4 -4
- data/lib/roro/{cli/templates/base/.circleci/jobs/_build.yml → stacks/stories_v1/templates/ruby_gem/.circleci/jobs/_test.yml} +2 -2
- data/lib/roro/{cli → stacks/stories_v1}/templates/ruby_gem/.circleci/setup-gem-credentials.sh +0 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/ruby_gem/docker-compose.yml +1 -1
- data/lib/roro/stacks/stories_v1/templates/ruby_gem/roro/containers/.keep +0 -0
- data/lib/roro/{cli → stacks/stories_v1}/templates/ruby_gem/roro/containers/ruby_image/Dockerfile.tt +1 -1
- data/lib/roro/stacks/stories_v1/templates/ruby_gem/roro/containers/ruby_image/ci.env.tt +1 -0
- data/lib/roro/stacks/stories_v1/templates/ruby_gem/roro/keys/.keep +0 -0
- data/lib/roro/version.rb +1 -1
- data/lib/roro.rb +60 -4
- data/mise/containers/ruby_gem/Dockerfile +16 -0
- data/mise/containers/ruby_gem/Dockerfile-app +51 -0
- data/{roro/containers/ruby_image/Dockerfile → mise/containers/ruby_gem/Dockerfile-ruby_gem} +0 -0
- data/mise/containers/ruby_gem/env/.keep +0 -0
- data/mise/containers/ruby_gem/env/base.env.enc +1 -0
- data/mise/containers/ruby_gem/env/ci.env.enc +2 -0
- data/mise/containers/ruby_gem/env/development.env.enc +1 -0
- data/mise/containers/ruby_gem/env/production.env.enc +1 -0
- data/mise/containers/ruby_gem/scripts/.keep +0 -0
- data/mise/env/base.env.enc +1 -0
- data/mise/env/ci.env.enc +1 -0
- data/mise/env/development.env.enc +1 -0
- data/mise/env/production.env.enc +1 -0
- data/mise/mise.roro +0 -0
- data/process.yml +401 -0
- data/roro.gemspec +8 -11
- metadata +353 -111
- data/lib/roro/cli/base/base.rb +0 -8
- data/lib/roro/cli/base/base_files.rb +0 -24
- data/lib/roro/cli/base/check_dependencies.rb +0 -97
- data/lib/roro/cli/base/continuous_integration.rb +0 -13
- data/lib/roro/cli/base/insert_gems.rb +0 -31
- data/lib/roro/cli/base/insertions.rb +0 -19
- data/lib/roro/cli/base/utilities.rb +0 -38
- data/lib/roro/cli/configuration.rb +0 -69
- data/lib/roro/cli/generate/config/rails.rb +0 -17
- data/lib/roro/cli/generate/config.rb +0 -11
- data/lib/roro/cli/generate/exposed.rb +0 -14
- data/lib/roro/cli/generate/keys.rb +0 -69
- data/lib/roro/cli/generate/obfuscated.rb +0 -17
- data/lib/roro/cli/greenfield/rails.rb +0 -36
- data/lib/roro/cli/rollon/rails/database/with_mysql.rb +0 -22
- data/lib/roro/cli/rollon/rails/database/with_postgresql.rb +0 -21
- data/lib/roro/cli/rollon/rails/database.rb +0 -30
- data/lib/roro/cli/rollon/rails.rb +0 -47
- data/lib/roro/cli/rollon/ruby_gem/with_ci_cd.rb +0 -45
- data/lib/roro/cli/rollon/ruby_gem.rb +0 -1
- data/lib/roro/cli/rollon/stories/stories.rb +0 -3
- data/lib/roro/cli/rollon/stories.rb +0 -2
- data/lib/roro/cli/roro_configurator.yml +0 -157
- data/lib/roro/cli/templates/base/.circleci/_defaults.yml +0 -17
- data/lib/roro/cli/templates/base/.circleci/_workflow.yml +0 -2
- data/lib/roro/cli/templates/base/.circleci/config.job-example.yml +0 -33
- data/lib/roro/cli/templates/base/.circleci/jobs/_release.yml +0 -12
- data/lib/roro/cli/templates/base/.circleci/workflows/_build_release.yml +0 -10
- data/lib/roro/cli/templates/base/.dockerignore +0 -51
- data/lib/roro/cli/templates/base/.roro_config.yml +0 -15
- data/lib/roro/cli/templates/base/dotenv +0 -1
- data/lib/roro/cli/templates/base/jumpstart/Dockerfile.tt +0 -30
- data/lib/roro/cli/templates/base/jumpstart/docker-compose.yml +0 -59
- data/lib/roro/cli/templates/base/jumpstart/docker-entrypoint.sh +0 -16
- data/lib/roro/cli/templates/base/livereload/hosts.example +0 -7
- data/lib/roro/cli/templates/rails/.circleci/_aliases.yml +0 -8
- data/lib/roro/cli/templates/rails/.circleci/jobs/_push.yml +0 -23
- data/lib/roro/cli/templates/rails/.circleci/jobs/_test.yml +0 -13
- data/lib/roro/cli/templates/rails/.circleci/workflows/_build_test_push.yml +0 -9
- data/lib/roro/cli/templates/rails/Dockerfile.greenfield.tt +0 -47
- data/lib/roro/cli/templates/rails/database/with_mysql/_service.yml +0 -10
- data/lib/roro/cli/templates/rails/database/with_postgresql/_service.yml +0 -7
- data/lib/roro/cli/templates/rails/dotenv/database.mysql.env.tt +0 -3
- data/lib/roro/cli/templates/rails/dotenv/database.pg.env.tt +0 -4
- data/lib/roro/cli/templates/rails/roro/containers/app/Dockerfile.tt +0 -88
- data/lib/roro/cli/templates/ruby_gem/roro/containers/ruby_image/ci.env.tt +0 -1
- data/lib/roro/cli/templates/stories/ruby_gem/with_ci_cd/_build.yml +0 -11
- data/lib/roro/cli/templates/stories/with_mysql/_service.yml +0 -10
- data/lib/roro/cli/templates/stories/with_postgresql/_service.yml +0 -7
- data/lib/tasks/deploy.rake +0 -126
- data/roro/containers/ruby_image/ci.env.enc +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c3367a0100cab60651928187b96db25f1a4ecaecca166afde2621e0fd09f4b17
|
4
|
+
data.tar.gz: 851e7f8fe51e02c206a506350d353a3f4663265d7568c61dc359c394ae5599f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4326d8ca1ec1a6bbd16a48403bf2f754799c46b29a83043d2b1d04c7165ba46073ebd0d8f4092ce0b8a8ea1476962ffeea4a260bd98b0808ce73820abe85017e
|
7
|
+
data.tar.gz: 5b7a70514ba7174f5a68dc07accf606374a20f441d7a76f46c728bc602e6b2f3a49bbc40c8e713b907d2f3fb7816e95d255a27abc12ac9f708da00a536765fff
|
data/.circleci/config.yml
CHANGED
@@ -1,92 +1,130 @@
|
|
1
|
-
aliases:
|
2
|
-
- &workspace-location
|
3
|
-
at: /tmp/workspace
|
4
|
-
- ©-ci-dotenv |
|
5
|
-
cp -rf /tmp/workspace/roro .
|
6
|
-
- &source-ci-variables |
|
7
|
-
echo 'source roro/containers/app/ci.env' >> $BASH_ENV
|
8
|
-
source $BASH_ENV
|
9
|
-
|
10
|
-
defaults: &defaults
|
11
|
-
executor: machine-executor
|
12
|
-
working_directory: ~/project
|
13
|
-
|
14
1
|
version: 2.1
|
15
2
|
|
16
3
|
executors:
|
17
|
-
|
18
|
-
machine: true
|
19
|
-
ruby-executor:
|
4
|
+
ruby-executor:
|
20
5
|
docker:
|
21
6
|
- image: cimg/ruby:2.7
|
22
|
-
|
23
|
-
|
7
|
+
linux:
|
8
|
+
docker:
|
9
|
+
- image: cimg/ruby:2.7
|
10
|
+
mac:
|
11
|
+
macos:
|
12
|
+
xcode: 11.4
|
13
|
+
ruby:
|
14
|
+
parameters:
|
15
|
+
version:
|
16
|
+
description: "version tag"
|
17
|
+
default: "2.5"
|
18
|
+
type: string
|
19
|
+
docker:
|
20
|
+
- image: cimg/ruby:<<parameters.version>>
|
21
|
+
|
22
|
+
defaults: &defaults
|
23
|
+
executor: ruby
|
24
24
|
|
25
|
+
major_only: &major_only
|
26
|
+
filters:
|
27
|
+
branches:
|
28
|
+
only: master
|
29
|
+
|
30
|
+
release: &release
|
31
|
+
filters:
|
32
|
+
branches:
|
33
|
+
only: release
|
34
|
+
|
35
|
+
commands:
|
36
|
+
run-test-case:
|
37
|
+
parameters:
|
38
|
+
answers:
|
39
|
+
type: string
|
40
|
+
default: "1\n2"
|
41
|
+
os:
|
42
|
+
type: executor
|
43
|
+
steps:
|
44
|
+
- run: |
|
45
|
+
rake install &&
|
46
|
+
printf "<< parameters.answers >>\ny\ny\ny\ny\ny\ny\ny$var\n" | roro rollon
|
47
|
+
- run: echo 'success'
|
48
|
+
|
49
|
+
jobs:
|
25
50
|
build:
|
26
51
|
<<: *defaults
|
27
52
|
steps:
|
28
53
|
- checkout
|
29
|
-
|
30
|
-
test-
|
31
|
-
|
32
|
-
|
33
|
-
|
54
|
+
|
55
|
+
test-against-ruby:
|
56
|
+
parameters:
|
57
|
+
version:
|
58
|
+
description: "version tag"
|
59
|
+
default: "3.0"
|
60
|
+
type: string
|
61
|
+
executor:
|
62
|
+
name: ruby
|
63
|
+
version: <<parameters.version>>
|
64
|
+
steps:
|
65
|
+
- checkout
|
66
|
+
- run: gem install bundler
|
67
|
+
- run: bundle
|
68
|
+
- run: bundle exec rake test
|
69
|
+
|
70
|
+
test-rollon:
|
71
|
+
parameters:
|
72
|
+
answers:
|
73
|
+
type: string
|
74
|
+
default: "1\n4"
|
75
|
+
os:
|
76
|
+
type: executor
|
77
|
+
default: linux
|
78
|
+
executor: << parameters.os >>
|
79
|
+
steps:
|
80
|
+
- checkout
|
34
81
|
- setup_remote_docker:
|
35
82
|
version: 19.03.12
|
36
83
|
- run: |
|
37
|
-
rake install
|
38
|
-
|
39
|
-
cd greenfield
|
40
|
-
(yes || true) | roro greenfield
|
84
|
+
rake install &&
|
85
|
+
printf "<< parameters.answers >>\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny$var\n" | roro rollon
|
41
86
|
- run: echo 'success'
|
42
|
-
|
43
|
-
test:
|
44
|
-
<<: *defaults
|
45
|
-
steps:
|
46
|
-
- checkout
|
47
|
-
- run: RUBY_VERSION=2.5 docker-compose build ruby_gem
|
48
|
-
- run: RUBY_VERSION=2.5 docker-compose up -d --force-recreate ruby_gem
|
49
|
-
- run: RUBY_VERSION=2.5 docker-compose run ruby_gem bundle exec rake test
|
50
|
-
- run: RUBY_VERSION=2.6 docker-compose build ruby_gem
|
51
|
-
- run: RUBY_VERSION=2.6 docker-compose up -d --force-recreate ruby_gem
|
52
|
-
- run: RUBY_VERSION=2.6 docker-compose run ruby_gem bundle exec rake test
|
53
|
-
- run: RUBY_VERSION=2.7 docker-compose build ruby_gem
|
54
|
-
- run: RUBY_VERSION=2.7 docker-compose up -d --force-recreate ruby_gem
|
55
|
-
- run: RUBY_VERSION=2.7 docker-compose run ruby_gem bundle exec rake test
|
56
|
-
|
87
|
+
|
57
88
|
release:
|
58
89
|
<<: *defaults
|
59
90
|
steps:
|
60
91
|
- checkout
|
61
|
-
- run:
|
62
|
-
- run:
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
- run:
|
69
|
-
- run:
|
70
|
-
- run: gem
|
71
|
-
|
92
|
+
- run: rake install
|
93
|
+
- run: |
|
94
|
+
export CI_KEY="Bx2LCiZo7Gedfz1OV9vh3w=="
|
95
|
+
roro generate:exposed ci
|
96
|
+
# - run: |
|
97
|
+
# echo $(cat ./mise/containers/ruby_image/env/ci.env) >> $BASH_ENV
|
98
|
+
# source $BASH_ENV
|
99
|
+
# - run: echo $RUBYGEMS_API_KEY
|
100
|
+
# - run: chmod +x ./.circleci/setup-gem-credentials.sh
|
101
|
+
# - run: ./.circleci/setup-gem-credentials.sh
|
102
|
+
# - run: chmod 0600 ./.gem/credentials
|
103
|
+
# - run: git checkout .
|
104
|
+
# - run: gem release
|
105
|
+
|
72
106
|
workflows:
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
107
|
+
matrix-test-rollon:
|
108
|
+
jobs:
|
109
|
+
- test-rollon:
|
110
|
+
<<: *major_only
|
111
|
+
matrix:
|
112
|
+
parameters:
|
113
|
+
answers: ["1\n1", "1\n2", "1\n3", "1\n4", "1\n5", "2\n1", "3\n1", "3\n2"]
|
114
|
+
os: [linux]
|
115
|
+
|
116
|
+
matrix-test-against-rubies:
|
117
|
+
jobs:
|
118
|
+
- test-against-ruby:
|
119
|
+
<<: *major_only
|
120
|
+
matrix:
|
121
|
+
parameters:
|
122
|
+
version: [ "2.5", "2.6", "2.7", "3.0" ]
|
123
|
+
|
124
|
+
gem-release:
|
125
|
+
jobs:
|
77
126
|
- build
|
78
|
-
- test-rollon-rails:
|
79
|
-
filters:
|
80
|
-
branches:
|
81
|
-
only: development
|
82
|
-
- test:
|
83
|
-
filters:
|
84
|
-
branches:
|
85
|
-
only: master
|
86
|
-
|
87
127
|
- release:
|
88
|
-
requires:
|
128
|
+
requires:
|
89
129
|
- build
|
90
|
-
|
91
|
-
branches:
|
92
|
-
only: release
|
130
|
+
<<: *release
|
data/.gitignore
CHANGED
@@ -10,15 +10,42 @@ Gemfile.lock
|
|
10
10
|
|
11
11
|
roro/**/*.env
|
12
12
|
roro/**/*.key
|
13
|
-
|
14
13
|
*.key
|
15
14
|
*.env
|
15
|
+
!/lib/roro/stacks/**/*.key
|
16
|
+
!/lib/roro/stacks/**/*.env
|
17
|
+
!test/**/*.key
|
18
|
+
!test/**/*.env
|
16
19
|
!/.gitignore
|
17
|
-
|
20
|
+
*.gem
|
18
21
|
tmp/*
|
19
|
-
!tmp/.keep
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
!tmp/.keep
|
23
|
+
TUTORIAL.md
|
24
|
+
|
25
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
26
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
27
|
+
|
28
|
+
# User-specific stuff
|
29
|
+
.idea/**/workspace.xml
|
30
|
+
.idea/**/tasks.xml
|
31
|
+
.idea/**/usage.statistics.xml
|
32
|
+
.idea/**/dictionaries
|
33
|
+
.idea/**/shelf
|
34
|
+
|
35
|
+
# Generated files
|
36
|
+
.idea/**/contentModel.xml
|
37
|
+
|
38
|
+
# Sensitive or high-churn files
|
39
|
+
.idea/**/dataSources/
|
40
|
+
.idea/**/dataSources.ids
|
41
|
+
.idea/**/dataSources.local.xml
|
42
|
+
.idea/**/sqlDataSources.xml
|
43
|
+
.idea/**/dynamic.xml
|
44
|
+
.idea/**/uiDesigner.xml
|
45
|
+
.idea/**/dbnavigator.xml
|
46
|
+
|
47
|
+
# File-based project format
|
48
|
+
*.iws
|
49
|
+
|
50
|
+
# IntelliJ
|
51
|
+
out/
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.7.2
|
data/Gemfile
CHANGED
data/Guardfile
CHANGED
@@ -1,17 +1,27 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
all_after_pass: true,
|
4
|
-
}
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
5
3
|
|
6
|
-
|
4
|
+
## Uncomment and set this to only include directories you want to watch
|
5
|
+
# directories %w(app lib config test spec features) \
|
6
|
+
# .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
7
|
+
|
8
|
+
## Note: if you are using the `directories` clause above and you are not
|
9
|
+
## watching the project directory ('.'), then you will want to move
|
10
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
11
|
+
#
|
12
|
+
# $ mkdir config
|
13
|
+
# $ mv Guardfile config/
|
14
|
+
# $ ln -s config/Guardfile .
|
15
|
+
#
|
16
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
17
|
+
|
18
|
+
guard :minitest, test_folders: ['test', 'lib/roro/stacks'] do
|
19
|
+
# with Minitest::Unit
|
20
|
+
watch(%r{^lib/roro/stacks/(.*)\/?(.*)_test\.rb$})
|
21
|
+
watch(%r{^lib/roro/stacks/(.*/)?([^/]+)\.yml$}) { |m| "lib/roro/stacks/#{m[1]}test" }
|
22
|
+
watch(%r{^lib/roro/stacks/(.*/)?templates/(.*)$}) { |m| "lib/roro/stacks/#{m[1]}test" }
|
7
23
|
|
8
24
|
watch(%r{^test/(.*)\/?(.*)_test\.rb$})
|
9
|
-
watch(%r{^lib/
|
10
|
-
watch(%r{^test/
|
11
|
-
watch(%r{^lib/roro/cli/(.+)\.rb$}) { |m| "test/cli/#{m[1]}_test.rb" }
|
12
|
-
watch(%r{^lib/roro/cli/templates/base(.+)\.yml$}) { |m| "test/cli" }
|
13
|
-
watch(%r{^lib/roro/cli/templates/rollon(.+)\.yml$}) { |m| "test/cli/rollon" }
|
14
|
-
watch(%r{^lib/roro/cli/templates/rollon(.+)\.tt$}) { |m| "test/cli/rollon" }
|
15
|
-
watch(%r{^lib/roro/cli/templates/greenfield(.+)\.yml$}) { |m| "test/cli/greenfield" }
|
16
|
-
watch(%r{^lib/roro/cli/templates/greenfield(.+)\.tt$}) { |m| "test/cli/greenfield" }
|
25
|
+
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}#{m[2]}_test.rb" }
|
26
|
+
watch(%r{^test/test_helper\.rb$}) { 'test' }
|
17
27
|
end
|
data/README.md
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
# RoRo
|
2
2
|
|
3
|
-
RoRo is a
|
3
|
+
RoRo is a set of tools and stories for building, running continuous integration tests on, and deploying your containerized projects. It aims to provide everything you need to:
|
4
4
|
|
5
|
-
1. Greenfield a
|
6
|
-
2. Containerize your existing application
|
7
|
-
3.
|
8
|
-
4. Roll your
|
9
|
-
5. Roll your containers off of CircleCI to your servers.
|
5
|
+
1. Greenfield a new project with a containerized app and database and other containers you might need.
|
6
|
+
2. Containerize your project's existing application, database, and services.
|
7
|
+
3. Roll your project into ci/cd.
|
8
|
+
4. Roll your project onto production servers with kubernetes.
|
10
9
|
|
11
10
|
## Getting started
|
12
11
|
|
@@ -25,10 +24,10 @@ Commands:
|
|
25
24
|
roro expose # Expose encrypted files
|
26
25
|
roro generate_key # Generate a key for each environment
|
27
26
|
roro generate_keys # Generates keys for all environments. If you have .en...
|
28
|
-
roro
|
27
|
+
roro omakase # Greenfield a brand new rails backend using Docker's inst...
|
29
28
|
roro help [COMMAND] # Describe available commands or one specific command
|
30
29
|
roro obfuscate # obfuscates any files matching the pattern ./docker/*...
|
31
|
-
roro rollon # Generates files necessary to
|
30
|
+
roro rollon # Generates files necessary to omakase a new backend wi...
|
32
31
|
roro ruby_gem # Generate files for containerized gem testing, Circle...
|
33
32
|
```
|
34
33
|
|
@@ -56,7 +55,7 @@ docker-compose version 1.21.0, build 5920eb0
|
|
56
55
|
```bash
|
57
56
|
$ mkdir -p handsome_app
|
58
57
|
$ cd handsome_app
|
59
|
-
$ roro
|
58
|
+
$ roro omakase
|
60
59
|
```
|
61
60
|
|
62
61
|
It'll take a few minutes for Docker to download your images, copy your files, and build your application but once finished, you'll see the Rails welcome screen at [http://localhost:3000](http://localhost:3000/).
|
@@ -95,7 +94,7 @@ As with greenfielding above, wait a few minutes, and when it's finished, open [h
|
|
95
94
|
From another terminal:
|
96
95
|
|
97
96
|
```bash
|
98
|
-
$ docker-compose exec
|
97
|
+
$ docker-compose exec backend bundle exec guard
|
99
98
|
```
|
100
99
|
|
101
100
|
To use LiveReoload with Guard, install the Chrome [extension](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en):
|
@@ -217,4 +216,5 @@ $ docker system prune -af --volumes
|
|
217
216
|
This gem and its associated practices are just one way of using these tools and not the canonical way. My purpose in publishing it is to get a conversation started about what conventions around these tools might look like. If you have ideas on how to make it better please put in an issue -- or fork the repo, make your changes, write your tests, and send me a pull request. It'll make me feel warm inside.
|
218
217
|
|
219
218
|
## License
|
220
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
219
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
220
|
+
|
data/bin/console
CHANGED
data/bin/setup
CHANGED
data/docker-compose.yml
CHANGED
@@ -5,11 +5,11 @@ services:
|
|
5
5
|
ruby_gem:
|
6
6
|
build:
|
7
7
|
context: .
|
8
|
-
dockerfile:
|
9
|
-
environment:
|
10
|
-
- RUBY_VERSION=${RUBY_VERSION}
|
8
|
+
dockerfile: mise/containers/ruby_gem/Dockerfile
|
11
9
|
volumes:
|
12
10
|
- gem_cache:/gems
|
11
|
+
environment:
|
12
|
+
RUBY_VERSION: '2.5'
|
13
13
|
|
14
14
|
volumes:
|
15
15
|
gem_cache:
|
@@ -1 +1,52 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Roro
|
4
|
+
class CLI < Thor
|
5
|
+
method_option :environments,
|
6
|
+
type: :array,
|
7
|
+
aliases: :e,
|
8
|
+
banner: 'one, two, three',
|
9
|
+
desc: 'The environments to generate:',
|
10
|
+
default: %w[base ci development production]
|
11
|
+
|
12
|
+
method_option :containers,
|
13
|
+
type: :array,
|
14
|
+
aliases: :c,
|
15
|
+
banner: 'container_one, container_two, container_three',
|
16
|
+
default: %w[backend database frontend],
|
17
|
+
desc: 'The containers to generate:'
|
18
|
+
|
19
|
+
method_option :mise_en_place,
|
20
|
+
type: :string,
|
21
|
+
aliases: :m,
|
22
|
+
default: 'mise',
|
23
|
+
desc: "The name of your mise en place folder. This is where your container folders, environment files, scripts, and keys will live"
|
24
|
+
|
25
|
+
method_option :keys,
|
26
|
+
type: :array,
|
27
|
+
aliases: :k,
|
28
|
+
banner: 'one.key two.key three.key',
|
29
|
+
default: %w[base ci development production],
|
30
|
+
desc: 'The names of your keys to generate. If none supplied, Roro will infer them from your .env files:'
|
31
|
+
|
32
|
+
desc 'generate', 'Generate stuff.'
|
33
|
+
map 'generate' => 'generate'
|
34
|
+
|
35
|
+
def generate
|
36
|
+
order = %w[mise_en_place containers environments keys]
|
37
|
+
order.each do |item|
|
38
|
+
value = options[item]
|
39
|
+
case item
|
40
|
+
when 'mise_en_place'
|
41
|
+
generate_mise(value)
|
42
|
+
when 'containers'
|
43
|
+
generate_containers(*value)
|
44
|
+
when 'environments'
|
45
|
+
generate_environments(*value)
|
46
|
+
when 'keys'
|
47
|
+
generate_keys(*value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Roro
|
4
|
+
# Where all the generation, configuration, greenfielding happens.
|
5
|
+
class CLI < Thor
|
6
|
+
desc 'generate:containers', 'Generate containers.'
|
7
|
+
map 'generate:containers' => 'generate_containers'
|
8
|
+
method_options :containers => :array
|
9
|
+
def generate_containers(*containers)
|
10
|
+
mise = Roro::CLI.mise
|
11
|
+
containers = options['containers'] || containers.empty? ? %w[frontend backend database] : containers
|
12
|
+
# siblings = Dir.glob('./*').select do |f|
|
13
|
+
# File.directory?(f)
|
14
|
+
# !f.match?(mise)
|
15
|
+
# end
|
16
|
+
# siblings = options[:containers] ? options[:containers] : default_containers
|
17
|
+
containers.each { |s| s.split('/').last }.each do |container|
|
18
|
+
create_file("#{mise}/containers/#{container}/scripts/.keep")
|
19
|
+
create_file("#{mise}/containers/#{container}/env/.keep")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Roro
|
4
|
+
class CLI < Thor
|
5
|
+
desc 'generate:environments', 'Generate environment files and keys'
|
6
|
+
map 'generate:environments' => 'generate_environments'
|
7
|
+
|
8
|
+
def generate_environments(*args)
|
9
|
+
if args.last.is_a?(Hash)
|
10
|
+
hash = args.pop
|
11
|
+
end
|
12
|
+
default_environments = Roro::CLI.roro_environments
|
13
|
+
mise = Roro::CLI.mise
|
14
|
+
environments = args.empty? ? default_environments : args
|
15
|
+
containers = Dir.glob("./#{mise}/containers/*").select { |f| File.directory?(f) }
|
16
|
+
environments.each do |env|
|
17
|
+
content = hash&.dig(env.to_sym)&.each&.map {|k,v| "#{k}=#{v[:value]}"}&.join("\n") || 'SOME_KEY=some_value'
|
18
|
+
create_file "./#{mise}/env/#{env}.env", content
|
19
|
+
containers.each do |container|
|
20
|
+
create_file "#{container}/env/#{env}.env", content
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Roro
|
2
|
+
class CLI < Thor
|
3
|
+
desc "generate:exposed", "Decrypts .smart.env.enc files for all environments or those specified."
|
4
|
+
map "generate:exposed" => "generate_exposed"
|
5
|
+
|
6
|
+
def generate_exposed(*environments)
|
7
|
+
exposer = Roro::Crypto::Exposer.new
|
8
|
+
exposer.expose(environments, Roro::CLI.mise, '.env.enc')
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Roro
|
4
|
+
class CLI < Thor
|
5
|
+
desc 'generate:keys', 'Generates a key for each <environment>.smart.env file.'
|
6
|
+
|
7
|
+
map 'generate:keys' => 'generate_keys'
|
8
|
+
map 'generate:key' => 'generate_keys'
|
9
|
+
|
10
|
+
def generate_keys(*environments)
|
11
|
+
key_writer = Roro::Crypto::KeyWriter.new
|
12
|
+
key_writer.write_keyfiles(environments.uniq)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Roro
|
4
|
+
class CLI < Thor
|
5
|
+
|
6
|
+
desc 'generate:mise MISE', 'Generate mise en place.'
|
7
|
+
map 'generate:mise' => 'generate_mise'
|
8
|
+
|
9
|
+
def generate_mise(mise_name = 'mise')
|
10
|
+
create_file "#{mise_name}/#{mise_name}.roro"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Roro
|
4
|
+
class CLI < Thor
|
5
|
+
|
6
|
+
desc 'generate:obfuscated', 'Encrypts .smart.env files for safe storage.'
|
7
|
+
map 'generate:obfuscated' => 'generate_obfuscated'
|
8
|
+
|
9
|
+
def generate_obfuscated(*environments)
|
10
|
+
obfuscator = Roro::Crypto::Obfuscator.new
|
11
|
+
obfuscator.obfuscate(environments, Roro::CLI.mise, '.env')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/roro/cli/rollon.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
module Roro
|
2
2
|
class CLI < Thor
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
3
|
+
|
4
|
+
desc 'rollon', 'Roll a fresh development story into the current directory.'
|
5
|
+
map 'rollon' => 'rollon'
|
6
|
+
|
7
|
+
def rollon
|
8
|
+
configurator = Roro::Configurators::Configurator.new
|
9
|
+
configurator.rollon
|
10
|
+
end
|
11
|
+
|
12
|
+
desc 'log itineraries', 'logs all possible itineraries in specified location'
|
13
|
+
map 'log_itineraries' => 'log_itineraries'
|
14
|
+
|
15
|
+
def log_itineraries(location = 'test/fixtures/itineraries')
|
16
|
+
builder = Roro::Configurators::AdventureCaseBuilder.new
|
17
|
+
builder.log_itineraries('test/fixtures/itineraries')
|
18
18
|
end
|
19
19
|
end
|
20
|
-
end
|
20
|
+
end
|