Browse Source

Elements and diskimage-create removed

You can find them in savanna-image-elements repo.

Fixes: bug #1234656

Change-Id: I75ad57ab16f1a117b33b0be5b2313325a51b1da9
Sergey Lukjanov 5 years ago
parent
commit
34ebde2bd6

+ 0
- 18
diskimage-create/README.rst View File

@@ -1,18 +0,0 @@
1
-Diskimage-builder script for creation cloud images
2
-=================================================
3
-
4
-This scrtips builds Ubuntu and Fedora cloud images with default parameters.
5
-
6
-For users:
7
-
8
-1. 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
-
10
-2. 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
-
16
-For developers:
17
-
18
-1. 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').

+ 0
- 79
diskimage-create/diskimage-create.sh View File

@@ -1,79 +0,0 @@
1
-#!/bin/bash
2
-
3
-set -e
4
-
5
-# Export variables for elements
6
-
7
-export DIB_HADOOP_VERSION="1.1.2"
8
-export JAVA_DOWNLOAD_URL="http://download.oracle.com/otn-pub/java/jdk/7u25-b15/jdk-7u25-linux-x64.tar.gz"
9
-export ubuntu_image_name="ubuntu_savanna_latest"
10
-export fedora_image_name="fedora_savanna_latest"
11
-export OOZIE_DOWNLOAD_URL="http://a8e0dce84b3f00ed7910-a5806ff0396addabb148d230fde09b7b.r31.cf1.rackcdn.com/oozie-3.3.2.tar.gz"
12
-export HIVE_VERSION="0.11.0"
13
-
14
-str=$(head -1 /etc/os-release)
15
-if [ $str = 'NAME="Ubuntu"' ]; then
16
-  apt-get update -y
17
-  apt-get install qemu kpartx git -y
18
-elif [ $str = 'NAME=Fedora' ]; then
19
-  yum update -y
20
-  yum install qemu kpartx git -y
21
-fi
22
-
23
-if [ -d /home/$USER/.cache/image-create ]; then
24
-  rm -rf /home/$USER/.cache/image-create/*
25
-fi
26
-
27
-cur_dir=$(pwd)
28
-if [ ! -d "DIB_work" ]; then
29
-   mkdir DIB_work
30
-fi
31
-pushd DIB_work
32
-
33
-# Cloning repostiroies
34
-
35
-rm -rf diskimage-builder
36
-git clone https://github.com/openstack/diskimage-builder
37
-rm -rf savanna-extra
38
-git clone https://github.com/stackforge/savanna-extra
39
-
40
-pushd diskimage-builder
41
-export DIB_COMMIT_ID=`git show --format=%H | head -1`
42
-popd
43
-
44
-export PATH=$PATH:$cur_dir/DIB_work/diskimage-builder/bin
45
-export ELEMENTS_PATH=$cur_dir/DIB_work/diskimage-builder/elements
46
-
47
-pushd savanna-extra
48
-export SAVANNA_ELEMENTS_COMMIT_ID=`git show --format=%H | head -1`
49
-popd
50
-
51
-if [ -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
55
-fi
56
-cp -r $cur_dir/DIB_work/savanna-extra/elements/* $cur_dir/DIB_work/diskimage-builder/elements/
57
-
58
-ubuntu_elements_sequence="base vm ubuntu hadoop swift_hadoop oozie mysql hive"
59
-fedora_elements_sequence="base vm fedora hadoop swift_hadoop oozie mysql hive selinux-permissive"
60
-
61
-if [ -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
66
-fi
67
-
68
-# Creating Ubuntu cloud image
69
-disk-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
73
-export DIB_IMAGE_SIZE="10"
74
-disk-image-create $fedora_elements_sequence -o $fedora_image_name
75
-
76
-mv $fedora_image_name.qcow2 ../
77
-mv $ubuntu_image_name.qcow2 ../
78
-popd
79
-rm -rf DIB_work

+ 0
- 2
elements/apt-mirror/README.md View File

@@ -1,2 +0,0 @@
1
-This element setups mirror for updating Ubuntu cloud image. Using mirror increases speed of building image.
2
-You should specify http url for Ubuntu mirror using parameter 'UBUNTU_MIRROR'.

+ 0
- 3
elements/apt-mirror/finalise.d/99-setup View File

@@ -1,3 +0,0 @@
1
-#!/bin/bash
2
-
3
-rm /etc/apt/apt.conf.d/01proxy

+ 0
- 5
elements/apt-mirror/pre-install.d/00-apt View File

@@ -1,5 +0,0 @@
1
-#!/bin/bash
2
-
3
-mkdir -p /etc/apt/apt.conf.d/
4
-touch /etc/apt/apt.conf.d/01proxy
5
-echo -e "Acquire::http { Proxy \"$UBUNTU_MIRROR\"; };" > /etc/apt/apt.conf.d/01proxy

+ 0
- 5
elements/apt-mirror/root.d/0-check View File

@@ -1,5 +0,0 @@
1
-#!/bin/bash
2
-if [ -z "$UBUNTU_MIRROR" ]; then
3
-  echo "You should specify parameter 'UBUNTU_MIRROR'"
4
-  exit 2
5
-fi

+ 0
- 2
elements/yum-mirror/README.md View File

@@ -1,2 +0,0 @@
1
-This element setups mirror for updating Fedora cloud image. Using mirror increases speed of building image.
2
-You should specify http url for Fedora mirror using parameter 'FEDORA_MIRROR'.

+ 0
- 3
elements/yum-mirror/finalise.d/99-setup View File

@@ -1,3 +0,0 @@
1
-#!/bin/bash
2
-
3
-mv /etc/yum.repos.d/tempfile /etc/yum.repos.d/fedora.repo

+ 0
- 12
elements/yum-mirror/pre-install.d/00-yum View File

@@ -1,12 +0,0 @@
1
-#!/bin/bash
2
-
3
-mv /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/tempfile
4
-cat >> /etc/yum.repos.d/fedora.repo <<EOF
5
-[Local-Repository]
6
-name=Fedora \$releasever - \$basearch - Local
7
-baseurl=$FEDORA_MIRROR
8
-enabled=1
9
-gpgcheck=0
10
-priority=1
11
-EOF
12
-yum makecache

+ 0
- 5
elements/yum-mirror/root.d/0-check View File

@@ -1,5 +0,0 @@
1
-#!/bin/bash
2
-if [ -z "$FEDORA_MIRROR" ]; then
3
-  echo "You should specify parameter 'FEDORA_MIRROR'"
4
-  exit 2
5
-fi

Loading…
Cancel
Save