Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
451f54ae
Commit
451f54ae
authored
10 years ago
by
Jenkins
Committed by
Gerrit Code Review
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Implements: Blueprint update-image-build-script"
parents
ddc12789
fd6d4376
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+3
-0
3 additions, 0 deletions
.gitignore
devenv/get-image.sh
+38
-0
38 additions, 0 deletions
devenv/get-image.sh
with
41 additions
and
0 deletions
.gitignore
+
3
−
0
View file @
451f54ae
...
@@ -2,5 +2,8 @@
...
@@ -2,5 +2,8 @@
*~
*~
[._]*.s[a-w][a-z]
[._]*.s[a-w][a-z]
# Any qcow images created from get-image script
*.qcow2
.tox/
.tox/
.buildconf
.buildconf
This diff is collapsed.
Click to expand it.
devenv/get-image.sh
0 → 100755
+
38
−
0
View file @
451f54ae
#!/bin/bash
# This script expects the following to be installed:
# curl, libguestfs-tools-c
IMAGE
=
Fedora-Cloud-Base-20141203-21.x86_64.qcow2
TARGET_DIR
=
/var/lib/libvirt/images
TARGET
=
fedora-21-x86_64
if
!
[
-f
"
$IMAGE
"
]
;
then
echo
"Downloading
$IMAGE
"
curl
-O
http://archive.fedoraproject.org/pub/fedora/linux/releases/21/Cloud/Images/x86_64/
$IMAGE
fi
echo
"Copying
$IMAGE
to
$TARGET
"
cp
"
$IMAGE
"
$TARGET_DIR
/
$TARGET
PACKAGES
=
"git,tcpdump"
virt-customize
\
--add
$TARGET_DIR
/
$TARGET
\
--install
$PACKAGES
\
--update
\
--install
$PACKAGES
\
--run-command
"yum clean all"
\
--run-command
"cat > /etc/sysconfig/network-scripts/ifcfg-eth1 <<EOF
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
DEFROUTE=no
EOF"
\
# SELinux relabeling requires virt-customize to have networking disabled
# https://bugzilla.redhat.com/show_bug.cgi?id=1122907
virt-customize
--add
$TARGET_DIR
/
$TARGET
--selinux-relabel
--no-network
echo
"Finished building image:"
ls
-l
$TARGET_DIR
/
$TARGET
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment