Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Add Packer #3650

Merged
merged 6 commits into from
Aug 13, 2018
Merged

Add Packer #3650

merged 6 commits into from
Aug 13, 2018

Conversation

CecileRobertMichon
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon commented Aug 9, 2018

What this PR does / why we need it: Add Packer for building custom vhd images https://www.packer.io/docs/builders/azure.html. Based on #3536

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

If applicable:

  • documentation
  • unit tests
  • tested backward compatibility (ie. deploy with previous version, upgrade with this branch)

Release note:

This is the second PR of a series of custom VHDs related PRs to breakdown #3536.

packer.mk Outdated
@packer version && make az-login && make init-packer && (make build-packer | tee packer-output)

az-copy:
@make az-login && (azcopy --source "${OS_DISK_SAS}" --destination "${CLASSIC_BLOB}/${VHD_NAME}" --dest-sas "${CLASSIC_SAS_TOKEN}")
Copy link
Member

Choose a reason for hiding this comment

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

I think az login should be a make target dependency instead:

az-copy: az-login
        azcopy --source "${OS_DISK_SAS}" --destination "${CLASSIC_BLOB}/${VHD_NAME}" --dest-sas "${CLASSIC_SAS_TOKEN}"

Same for the generate-sas: target below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I'll fix it. Thanks!

@codecov
Copy link

codecov bot commented Aug 10, 2018

Codecov Report

Merging #3650 into master will increase coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3650      +/-   ##
==========================================
+ Coverage   55.99%   56.03%   +0.03%     
==========================================
  Files         108      108              
  Lines       16314    16314              
==========================================
+ Hits         9135     9141       +6     
+ Misses       6412     6404       -8     
- Partials      767      769       +2

@CecileRobertMichon
Copy link
Contributor Author

@mboersma I addressed your comments, please take a look when you can

packer.mk Outdated
az login --service-principal -u ${CLIENT_ID} -p ${CLIENT_SECRET} --tenant ${TENANT_ID}

run-packer: az-login
@packer version && make init-packer && (make build-packer | tee packer-output)
Copy link
Member

Choose a reason for hiding this comment

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

When you invoke make from inside a Makefile, it should be referred to as $(MAKE) according to the GNU docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Member

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

This looks good to me, just had one optional comment about recursive use of make.

@jackfrancis
Copy link
Member

/lgtm

@acs-bot
Copy link

acs-bot commented Aug 13, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, jackfrancis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [CecileRobertMichon,jackfrancis]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@acs-bot
Copy link

acs-bot commented Aug 13, 2018

New changes are detected. LGTM label has been removed.

@acs-bot acs-bot removed the lgtm label Aug 13, 2018
@CecileRobertMichon CecileRobertMichon merged commit cf76032 into Azure:master Aug 13, 2018
@ghost ghost removed the in progress label Aug 13, 2018
@seanknox
Copy link
Contributor

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants