jnprautomate / firefly-packer Goto Github PK
View Code? Open in Web Editor NEWPacker scripts for building cloud-automatation-friendly Firefly images
License: Apache License 2.0
Packer scripts for building cloud-automatation-friendly Firefly images
License: Apache License 2.0
e.g. if you're using virtualbox & vmware, may God have mercy on your soul
Include with project
Also http://vagrantcloud.com/juniper page
modify /boot/loader.conf
:
# console="comconsole"
to console="vidconsole"
Script edit AND VBoxManage modifyvm to remove needs for Packer boot, e.g.:
["modifyvm", "{{.Name}}", "--uart1", "0x3F8", "4"],
["modifyvm", "{{.Name}}", "--uartmode1", "disconnected"]
allow the machine to boot with vidconsole for initial debugging, and then can be removed from any .VDI or .box artifacts, once finished (and the machine properly boots with vidconsole).
This is required for sufficient serial console and NETCONF over Serial testing.
When working with network automation scripts, sometimes key-based authentication is not available (napalm-junos, etc). Setting a default password for the vagrant user (who drops directly into cli instead of a shell) would make it easier to setup lab/testing environments for these tools.
Basically the network does not map to the NAT default. First it must be defined on the machine and they can we test to see if it is there before we assign it.
Replace bash cut+paste scripts. All future tasks should have thor tasks before being committed.
Pending Packer additions for qemu-cqow2 builder (currently only supports ISO)
This is on Ubuntu 14.04 with VirtualBox 4.3.10 and Vagrant 1.6.5.
After downloading, initializing, and starting Vagrant box for image X47-D10.4, I am unable to SSH to the box. Waited approximately 8 minutes before giving up. See below.
tyler:boxes/ > vagrant up [11:21:13]
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'juniper/ffp-12.1X47-D10.4' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'juniper/ffp-12.1X47-D10.4'
default: URL: https://vagrantcloud.com/juniper/ffp-12.1X47-D10.4
==> default: Adding box 'juniper/ffp-12.1X47-D10.4' (v0.1.4) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/juniper/boxes/ffp-12.1X47-D10.4/versions/2/providers/virtualbox.box
==> default: Successfully added box 'juniper/ffp-12.1X47-D10.4' (v0.1.4) for 'virtualbox'!
==> default: Importing base box 'juniper/ffp-12.1X47-D10.4'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'juniper/ffp-12.1X47-D10.4' is up to date...
==> default: Setting the name of the VM: boxes_default_1412792564494_18731
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: root
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
tyler:boxes/ >
tyler:boxes/ > telnet 127.0.0.1 2222 [11:28:05]
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
^]c
telnet> c
Connection closed.
tyler:boxes/ > ssh -p2222 [email protected] [11:28:17]
ssh_exchange_identification: read: Connection reset by peer
tyler:boxes/ > ssh -p2222 [email protected] [11:29:53]
ssh_exchange_identification: read: Connection reset by peer
tyler:boxes/ > [11:31:34]
tyler:boxes/ > ssh -vvv -p2222 [email protected] [11:31:34]
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 2222.
debug1: Connection established.
debug1: identity file /home/tyler/.ssh/id_rsa type -1
debug1: identity file /home/tyler/.ssh/id_rsa-cert type -1
debug1: identity file /home/tyler/.ssh/id_dsa type -1
debug1: identity file /home/tyler/.ssh/id_dsa-cert type -1
debug1: identity file /home/tyler/.ssh/id_ecdsa type -1
debug1: identity file /home/tyler/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/tyler/.ssh/id_ed25519 type -1
debug1: identity file /home/tyler/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
ssh_exchange_identification: read: Connection reset by peer
tyler:boxes/ > [11:33:36]
tyler:boxes/ > cat /etc/ssh/ssh_config | egrep -v "^#|^$" [11:33:28]
Host *
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
tyler:boxes/ > [11:33:52]
tyler:boxes/ > cat /etc/lsb-release [11:34:31]
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
tyler:boxes/ > uname -a [11:34:33]
Linux 02144 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
tyler:boxes/ > [11:34:34]
After assiging to nat network manual after ff is up via vagrant up the attempt to ssh is refused. Never connects.
Newer platforms aren't shutting down on Packer, w/manual shutdown required. Look into better shutdown command / what changed.
Right now, the only solutions are making the user change the .VMX file location, unless:
a) ovftool will behave properly
b) Packer supports vmware-ovf builder
c) the vmware-vmx portion allows for a little templating
For now, you may have to manually change the source path for VMware VMX in the templates
Currently supported by JNPRAutomate/packer - add additional fixes to hashicorp/packer#1169
VirtualBox boxes can be successfully built by a manual process, but this is failing - most likely an error with the packer fork at this point. Should be fixed shortly.
Request from Juniper APAC Tech Summit attendee - Rails or Sinatra
config.vm.post_up_message
would be nice, as we go through the next iteration
http://docs.vagrantup.com/v2/vagrantfile/machine_settings.html
Readme.md
Newer VirtualBox-based platforms aren't shutting down in Packer, w/manual shutdown required. Look into better shutdown command / what changed.
Requires modification to Vagrant core - implement ASAP.
Junos-centric commands or non-bash shell???
machine.communicate.test("uname -s | grep 'JUNOS'", shell: 'sh')
change_host_name
- test, set, commitconfigure_networks
- logical ge-0/0/x.0 only, commit... hmmmhalt
- request system power-off
insert_public_key
- modify user on Junos sideHyper-V is a supported type for Vagrant Cloud, and could be an easy target to support.
VAGRANTFILE_API_VERSION = "2"
set twice (template + default Vagrantfile)
Upload linux binaries for Packer with fixes for vmware-vmx and virtualbox-ovf to s3, and updated .travis.yml script
Also, cache .bin in travis
Build failing until then...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.