Giter Club home page Giter Club logo

hmcts.base-image's Introduction

Notes:
1) The molecule test is here to test the ansible section only, run:
  molecule test
All the playbook does is set SSHD ciphers and restart SSHD

2) build with packer:
  packer build centos7-vbox.json
  or for qemu/kvm:
  packer build centos7.json

3) Convert image to vhd format for Azure if needed:
  for qemu type:
    qemu-img convert -f qcow2 -O vpc output_centos_tdhtest/tdhtest.qcow2 output_centos_tdhtest/tdhtest.vhd
  for virtualbox/vmdk file:
    qemu-img convert -f vmdk -O vpc x.vmdk y.vhd

4) Delete old qcow2 format image to save space:
  rm output_centos_tdhtest/tdhtest.qcow2



# TODO:
Test with raw format in centos7.json, see if it speeds things up


# TODO:
Use variables for the root password or reset/wipe/randomize it with the ansible section
See this for variables if we use that:
https://www.packer.io/docs/templates/user-variables.html

#TODO:
upload image to azure properly

azure login
azure vm image create <ImageName> `
    --blob-url <BlobStorageURL>/<YourImagesFolder>/<VHDName> `
    --os Linux <PathToVHDFile>

In the previous example:
BlobStorageURL is the URL for the storage account you plan to use
YourImagesFolder is the container within blob storage where you want to store your images
VHDName is the label that appears in portal to identify the virtual hard disk.
PathToVHDFile is the full path and name of the .vhd file on your machine.
+
The following command shows a complete example:
Azure CLI

Copy
azure vm image create myImage `
    --blob-url https://mystorage.blob.core.windows.net/vhds/myimage.vhd `
    --os Linux /home/ahmet/myimage.vhd


Create a VM from the image
azure vm create --userName ops --password P@ssw0rd! --vm-size Small --ssh `
    --location "West US" "myDeployedVM" myImage


I did:
azure config mode asm
azure vm image create jamespImage --blob-url https://mystorage.blob.core.windows.net/vhds/jamespImage.vhd --os Linux output_centos_tdhtest/tdhtest.vhd

Complains for some reason, unsure why.
Tried to install az (beta/new version of cli) but it wants a newer urllib3?? Maybe Ubuntu has a newer one

hmcts.base-image's People

Contributors

kyrian-hmcts avatar

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.