summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Lukjanov <slukjanov@mirantis.com>2013-10-03 15:23:01 +0400
committerSergey Lukjanov <slukjanov@mirantis.com>2013-10-03 15:23:35 +0400
commit34ebde2bd66e54a0cb78c225e3197dd1fe9d32c2 (patch)
tree56ac292e954d25a771ce20a4767f2a5f6316a860
parentc3ef37253fd615a604c7f160e63ec90e0f2afc96 (diff)
Elements and diskimage-create removed0.3.rc1
You can find them in savanna-image-elements repo. Fixes: bug #1234656 Change-Id: I75ad57ab16f1a117b33b0be5b2313325a51b1da9
Notes
Notes (review): Verified+2: Jenkins Approved+1: Alexander Ignatov <aignatov@mirantis.com> Code-Review+2: Alexander Ignatov <aignatov@mirantis.com> Code-Review+2: Matthew Farrellee <matt@redhat.com> Submitted-by: Jenkins Submitted-at: Thu, 03 Oct 2013 12:06:41 +0000 Reviewed-on: https://review.openstack.org/49515 Project: stackforge/savanna-extra Branch: refs/heads/master
-rw-r--r--diskimage-create/README.rst18
-rwxr-xr-xdiskimage-create/diskimage-create.sh79
-rw-r--r--elements/apt-mirror/README.md2
-rwxr-xr-xelements/apt-mirror/finalise.d/99-setup3
-rwxr-xr-xelements/apt-mirror/pre-install.d/00-apt5
-rwxr-xr-xelements/apt-mirror/root.d/0-check5
-rw-r--r--elements/yum-mirror/README.md2
-rwxr-xr-xelements/yum-mirror/finalise.d/99-setup3
-rwxr-xr-xelements/yum-mirror/pre-install.d/00-yum12
-rw-r--r--elements/yum-mirror/root.d/0-check5
10 files changed, 0 insertions, 134 deletions
diff --git a/diskimage-create/README.rst b/diskimage-create/README.rst
deleted file mode 100644
index 4a56d13..0000000
--- a/diskimage-create/README.rst
+++ /dev/null
@@ -1,18 +0,0 @@
1Diskimage-builder script for creation cloud images
2=================================================
3
4This scrtips builds Ubuntu and Fedora cloud images with default parameters.
5
6For users:
7
81. Use your environment (export / setenv) to alter the scripts behavior. Environment variables the script accepts are DIB_HADOOP_VERSION, JAVA_DOWNLOAD_URL, OOZIE_DOWNLOAD_URL, HIVE_VERSION, ubuntu_image_name, fedora_image_name.
9
102. If you want to use your local mirrors, you should specify http urls for Fedora and Ubuntu mirrors using parameters 'FEDORA_MIRROR' and 'UBUNTU_MIRROR' like this:
11
12.. sourcecode:: bash
13
14 sudo USE_MIRRORS=true FEDORA_MIRROR="url_for_fedora_mirror" UBUNTU_MIRROR="url_for_ubuntu_mirror" bash diskimage-create.sh
15
16For developers:
17
181. If you want to add your element to this repository, you should edit this script in your commit (you should export variables for your element and add name of element to variables 'element_sequence').
diff --git a/diskimage-create/diskimage-create.sh b/diskimage-create/diskimage-create.sh
deleted file mode 100755
index 41bd66b..0000000
--- a/diskimage-create/diskimage-create.sh
+++ /dev/null
@@ -1,79 +0,0 @@
1#!/bin/bash
2
3set -e
4
5# Export variables for elements
6
7export DIB_HADOOP_VERSION="1.1.2"
8export JAVA_DOWNLOAD_URL="http://download.oracle.com/otn-pub/java/jdk/7u25-b15/jdk-7u25-linux-x64.tar.gz"
9export ubuntu_image_name="ubuntu_savanna_latest"
10export fedora_image_name="fedora_savanna_latest"
11export OOZIE_DOWNLOAD_URL="http://a8e0dce84b3f00ed7910-a5806ff0396addabb148d230fde09b7b.r31.cf1.rackcdn.com/oozie-3.3.2.tar.gz"
12export HIVE_VERSION="0.11.0"
13
14str=$(head -1 /etc/os-release)
15if [ $str = 'NAME="Ubuntu"' ]; then
16 apt-get update -y
17 apt-get install qemu kpartx git -y
18elif [ $str = 'NAME=Fedora' ]; then
19 yum update -y
20 yum install qemu kpartx git -y
21fi
22
23if [ -d /home/$USER/.cache/image-create ]; then
24 rm -rf /home/$USER/.cache/image-create/*
25fi
26
27cur_dir=$(pwd)
28if [ ! -d "DIB_work" ]; then
29 mkdir DIB_work
30fi
31pushd DIB_work
32
33# Cloning repostiroies
34
35rm -rf diskimage-builder
36git clone https://github.com/openstack/diskimage-builder
37rm -rf savanna-extra
38git clone https://github.com/stackforge/savanna-extra
39
40pushd diskimage-builder
41export DIB_COMMIT_ID=`git show --format=%H | head -1`
42popd
43
44export PATH=$PATH:$cur_dir/DIB_work/diskimage-builder/bin
45export ELEMENTS_PATH=$cur_dir/DIB_work/diskimage-builder/elements
46
47pushd savanna-extra
48export SAVANNA_ELEMENTS_COMMIT_ID=`git show --format=%H | head -1`
49popd
50
51if [ -e $cur_dir/DIB_work/diskimage-builder/sudoers.d/img-build-sudoers ]; then
52 cp $cur_dir/DIB_work/diskimage-builder/sudoers.d/img-build-sudoers /etc/sudoers.d/
53 chown root:root /etc/sudoers.d/img-build-sudoers
54 chmod 0440 /etc/sudoers.d/img-build-sudoers
55fi
56cp -r $cur_dir/DIB_work/savanna-extra/elements/* $cur_dir/DIB_work/diskimage-builder/elements/
57
58ubuntu_elements_sequence="base vm ubuntu hadoop swift_hadoop oozie mysql hive"
59fedora_elements_sequence="base vm fedora hadoop swift_hadoop oozie mysql hive selinux-permissive"
60
61if [ -n "$USE_MIRRORS" ]; then
62 mirror_element=" apt-mirror"
63 ubuntu_elements_sequence=$ubuntu_elements_sequence$mirror_element
64 mirror_element=" yum-mirror"
65 fedora_elements_sequence=$fedora_elements_sequence$mirror_element
66fi
67
68# Creating Ubuntu cloud image
69disk-image-create $ubuntu_elements_sequence -o $ubuntu_image_name
70
71# Creating Fedora cloud image
72# Patameter 'DIB_IMAGE_SIZE' should be specified for Fedora only
73export DIB_IMAGE_SIZE="10"
74disk-image-create $fedora_elements_sequence -o $fedora_image_name
75
76mv $fedora_image_name.qcow2 ../
77mv $ubuntu_image_name.qcow2 ../
78popd
79rm -rf DIB_work
diff --git a/elements/apt-mirror/README.md b/elements/apt-mirror/README.md
deleted file mode 100644
index 7e722ef..0000000
--- a/elements/apt-mirror/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
1This element setups mirror for updating Ubuntu cloud image. Using mirror increases speed of building image.
2You should specify http url for Ubuntu mirror using parameter 'UBUNTU_MIRROR'.
diff --git a/elements/apt-mirror/finalise.d/99-setup b/elements/apt-mirror/finalise.d/99-setup
deleted file mode 100755
index 9e47021..0000000
--- a/elements/apt-mirror/finalise.d/99-setup
+++ /dev/null
@@ -1,3 +0,0 @@
1#!/bin/bash
2
3rm /etc/apt/apt.conf.d/01proxy
diff --git a/elements/apt-mirror/pre-install.d/00-apt b/elements/apt-mirror/pre-install.d/00-apt
deleted file mode 100755
index 492b59a..0000000
--- a/elements/apt-mirror/pre-install.d/00-apt
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/bash
2
3mkdir -p /etc/apt/apt.conf.d/
4touch /etc/apt/apt.conf.d/01proxy
5echo -e "Acquire::http { Proxy \"$UBUNTU_MIRROR\"; };" > /etc/apt/apt.conf.d/01proxy
diff --git a/elements/apt-mirror/root.d/0-check b/elements/apt-mirror/root.d/0-check
deleted file mode 100755
index 4b1b094..0000000
--- a/elements/apt-mirror/root.d/0-check
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/bash
2if [ -z "$UBUNTU_MIRROR" ]; then
3 echo "You should specify parameter 'UBUNTU_MIRROR'"
4 exit 2
5fi
diff --git a/elements/yum-mirror/README.md b/elements/yum-mirror/README.md
deleted file mode 100644
index 724cf0c..0000000
--- a/elements/yum-mirror/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
1This element setups mirror for updating Fedora cloud image. Using mirror increases speed of building image.
2You should specify http url for Fedora mirror using parameter 'FEDORA_MIRROR'.
diff --git a/elements/yum-mirror/finalise.d/99-setup b/elements/yum-mirror/finalise.d/99-setup
deleted file mode 100755
index 9ec414e..0000000
--- a/elements/yum-mirror/finalise.d/99-setup
+++ /dev/null
@@ -1,3 +0,0 @@
1#!/bin/bash
2
3mv /etc/yum.repos.d/tempfile /etc/yum.repos.d/fedora.repo
diff --git a/elements/yum-mirror/pre-install.d/00-yum b/elements/yum-mirror/pre-install.d/00-yum
deleted file mode 100755
index 71b94b3..0000000
--- a/elements/yum-mirror/pre-install.d/00-yum
+++ /dev/null
@@ -1,12 +0,0 @@
1#!/bin/bash
2
3mv /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/tempfile
4cat >> /etc/yum.repos.d/fedora.repo <<EOF
5[Local-Repository]
6name=Fedora \$releasever - \$basearch - Local
7baseurl=$FEDORA_MIRROR
8enabled=1
9gpgcheck=0
10priority=1
11EOF
12yum makecache
diff --git a/elements/yum-mirror/root.d/0-check b/elements/yum-mirror/root.d/0-check
deleted file mode 100644
index e491fba..0000000
--- a/elements/yum-mirror/root.d/0-check
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/bash
2if [ -z "$FEDORA_MIRROR" ]; then
3 echo "You should specify parameter 'FEDORA_MIRROR'"
4 exit 2
5fi