Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap-coa-env(*) #164

Merged
merged 1 commit into from
Jul 27, 2018
Merged

bootstrap-coa-env(*) #164

merged 1 commit into from
Jul 27, 2018

Conversation

lucaspinto
Copy link
Contributor

Fixes #113 .

Changes proposed in this pull-request:

  • adds a script called "bootstrap_coa_env.rb" that, when fed a list of prerequisites credentials, creates a minimal COA environment.

@lucaspinto lucaspinto requested a review from o-orand July 11, 2018 09:34
@@ -75,7 +75,7 @@ resources:
bucket: ((s3-stemcell-bucket))
region_name: ((s3-stemcell-region-name))
# customization is required to remove bosh prefix in stemcell name
regexp: ((stemcell-name-prefix))((stemcell-main-name))/bosh-stemcell-(.*)-((stemcell-main-name)).tgz
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to remove this.

@lucaspinto lucaspinto force-pushed the 113_coa_env_bootstrap branch 8 times, most recently from c93923f to 64a0209 Compare July 12, 2018 08:16
Copy link
Member

@o-orand o-orand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explanations in the Readme are fine.
We may add openstack samples

Dockerfile Outdated
@@ -24,6 +24,17 @@ RUN curl -sfL "https://codeclimate.com/downloads/test-reporter/test-reporter-lat
RUN curl -sfL "https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc" > /usr/local/bin/gh-md-toc \
&& chmod a+x /usr/local/bin/gh-md-toc

RUN curl -sfL "https://github.com/starkandwayne/bucc/archive/v0.5.0.tar.gz" > bucc.tar.gz \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should see if we can use concourse to download bucc from github instead of a manual download

Readme.md Outdated
- deploy_transiant_infra: you can deactivate this step if you already have an infrastructure with BOSH and Concourse
- upload_stemcell: you can deactivate this step if you don't want a new stemcell to be uploaded to the BOSH Director
- upload_cloud_config: you can deactivate this step if you don't want to overwrite the cloud config of the BOSH Director
- install_git_server: you can deactivate this step if you have the git-server deployment already deployed on the BOSH Director
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or a private git repo

secrets-branch: master
paas-templates-branch: master
cf-ops-automation-uri: http://github.com/orange-cloudfoundry/cf-ops-automation/
cf-ops-automation-branch: 113_coa_env_bootstrap
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to set it to master before merging this PR

@@ -112,7 +112,7 @@ resources:
bucket: ((s3-stemcell-bucket))
region_name: ((s3-stemcell-region-name))
# customization is required to remove bosh prefix in stemcell name
regexp: ((stemcell-name-prefix))((stemcell-main-name))/bosh-stemcell-(.*)-((stemcell-main-name)).tgz
regexp: ((stemcell-name-prefix))/bosh-stemcell-(.*)-((stemcell-main-name)).tgz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires #128 or skip this change

@@ -452,7 +452,7 @@ jobs:
- get: secrets-full-writer
params: { submodules: none}
- get: bosh-stemcell
version: { path: ((stemcell-name-prefix))((stemcell-main-name))/bosh-stemcell-((stemcell-version))-((stemcell-main-name)).tgz }
version: { path: ((stemcell-name-prefix))/bosh-stemcell-((stemcell-version))-((stemcell-main-name)).tgz }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires #128 or skip this change

@@ -831,7 +831,7 @@ jobs:
echo "check-resource -r $BUILD_PIPELINE_NAME/<%= name %> --from version:((<%= name %>-version))" >> result-dir/flight-plan
<% end %>
<% end %>
echo "check-resource -r $BUILD_PIPELINE_NAME/bosh-stemcell --from path:((stemcell-name-prefix))((stemcell-main-name))/bosh-stemcell-((stemcell-version))-((stemcell-main-name)).tgz" >> result-dir/flight-plan
echo "check-resource -r $BUILD_PIPELINE_NAME/bosh-stemcell --from path:((stemcell-name-prefix))/bosh-stemcell-((stemcell-version))-((stemcell-main-name)).tgz" >> result-dir/flight-plan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires #128 or skip this change

stemcell-main-name: warden-boshlite-ubuntu-trusty-go_agent
stemcell-version: "3586.25"
s3-stemcell-endpoint: https://s3.amazonaws.com
s3-stemcell-skip-ssl-verification: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a large configuration file, but I'm not sure it is possible to have a smaller one :-(

@@ -0,0 +1,20 @@
#!/usr/bin/env ruby -w

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a usage, and we may rename it to be more explicit (like extract-pipeline-credentials-list.rb)

File.join(File.join(File.dirname(__FILE__), '..', path, 'fixtures'))
end

def new_tmpdir_path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using mktmpdir ?, so we won't need tmp/.gitkeep

@@ -133,5 +135,4 @@ def fly(arg, env = {})
def execute(cmd, env = {})
fly("execute #{cmd}", env)
end

end

This comment was marked as resolved.

@o-orand
Copy link
Member

o-orand commented Jul 12, 2018

to fix the stemcells issue, we need the online stemcell support (#128)

Copy link
Member

@o-orand o-orand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do NOT merge due to change into depls-pipeline abour the stemcell

@lucaspinto lucaspinto force-pushed the 113_coa_env_bootstrap branch 5 times, most recently from 4fe5f23 to f6756bd Compare July 19, 2018 10:09
@lucaspinto
Copy link
Contributor Author

I updated the branch.

@o-orand
Copy link
Member

o-orand commented Jul 19, 2018

Could you please fix the following codeclimate issue:

  • Use == if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. - Found in scripts/extract_pipeline_credentials_list.rb by rubocop

    • if path = ARGV[0]
  • Align the parameters of a method call if they span more than one line. - Found in lib/coa_env_bootstrapper/base.rb by rubocop

    • :prereqs
  • Lists should be surrounded by blank lines New - Found in Readme.md by markdownlint

    • inactive_steps (optional): pass a list of steps that will be deactivated in case you wouldn't need them to run, for instance in case you have some resources already installed. You can deactivate:
  • Bare URL used New - Found in Readme.md by markdownlint

@o-orand
Copy link
Member

o-orand commented Jul 19, 2018

Could you rebase and squash both commits into one.

@lucaspinto lucaspinto force-pushed the 113_coa_env_bootstrap branch 3 times, most recently from cb3627e to eabb3d9 Compare July 19, 2018 15:55
files.each do |path|
next if File.directory?(path)
pipeline_content = File.read(path)
creds_list << pipeline_content.scan(/\(\(([\w|-]*)\)\)/).flatten.uniq
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use %r{ } syntax

@lucaspinto lucaspinto force-pushed the 113_coa_env_bootstrap branch from eabb3d9 to b1d7304 Compare July 25, 2018 16:17
@lucaspinto
Copy link
Contributor Author

I still need to fix the docs.

@lucaspinto lucaspinto force-pushed the 113_coa_env_bootstrap branch 2 times, most recently from db083ae to 3a3aee0 Compare July 26, 2018 07:26
@lucaspinto lucaspinto force-pushed the 113_coa_env_bootstrap branch from 3a3aee0 to a7c0fba Compare July 26, 2018 11:51
@lucaspinto
Copy link
Contributor Author

Docs fixed

@lucaspinto lucaspinto force-pushed the 113_coa_env_bootstrap branch from a7c0fba to afdfd01 Compare July 26, 2018 11:53
@o-orand o-orand force-pushed the 113_coa_env_bootstrap branch 2 times, most recently from b835458 to 5eeae60 Compare July 27, 2018 09:16
@o-orand o-orand merged commit c233387 into develop Jul 27, 2018
@o-orand
Copy link
Member

o-orand commented Jul 27, 2018

We still need to work on running bootstrap on openstack

@o-orand o-orand deleted the 113_coa_env_bootstrap branch July 27, 2018 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants