Skip to content
Snippets Groups Projects
Commit b1138d67 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

nomad and consul packages

parent 6b60ce68
No related branches found
No related tags found
No related merge requests found
cmake_minimum_required(VERSION 3.5)
PROJECT(ASAPO_HA)
add_subdirectory (Packages)
INCLUDE(ExternalProject)
ExternalProject_Add(
consul
URL https://releases.hashicorp.com/consul/1.2.0/consul_1.2.0_linux_amd64.zip
PATCH_COMMAND ""
CONFIGURE_COMMAND ""
CMAKE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND ""
INSTALL_COMMAND ""
)
ExternalProject_Add(
nomad
URL https://releases.hashicorp.com/nomad/0.8.4/nomad_0.8.4_linux_amd64.zip
PATCH_COMMAND ""
CONFIGURE_COMMAND ""
CMAKE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND ""
INSTALL_COMMAND ""
)
ExternalProject_Get_Property(consul SOURCE_DIR)
set (CONSUL_SOURCE_DIR ${SOURCE_DIR})
ExternalProject_Get_Property(nomad SOURCE_DIR)
set (NOMAD_SOURCE_DIR ${SOURCE_DIR})
install(PROGRAMS ${CONSUL_SOURCE_DIR}/consul DESTINATION bin)
install(PROGRAMS ${NOMAD_SOURCE_DIR}/nomad DESTINATION bin)
install(PROGRAMS ${NOMAD_SOURCE_DIR}/nomad DESTINATION bin)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/usr/lib/systemd/system/
DESTINATION /usr/lib/systemd/system)
\ No newline at end of file
# create debian package
SET(CPACK_BINARY_DEB ON)
SET(CPACK_BINARY_RPM ON)
#SET (CPACK_DEBIAN_PACKAGE_MAINTAINER "Sergey Yakubov (sergey.yakubov@desy.de)")
#SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
SET (CPACK_PACKAGE_CONTACT "Sergey Yakubov (sergey.yakubov@desy.de)")
SET(CPACK_PACKAGE_ARCHITECTURE "amd64")
SET(CPACK_PACKAGE_NAME "asapo-ha")
SET(CPACK_PACKAGE_VENDOR "DESY")
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
SET(CPACK_PACKAGE_VERSION_MINOR "2")
SET(CPACK_PACKAGE_VERSION_PATCH "2")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Nomad and Consul for Asapo Debian package")
SET(CPACK_BINARY_STGZ OFF)
SET(CPACK_BINARY_TBZ2 OFF)
SET(CPACK_BINARY_TGZ OFF)
SET(CPACK_BINARY_TZ OFF)
SET(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/postinst")
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst")
INCLUDE(CPack)
#!/usr/bin/env bash
useradd -r -s /bin/false asapo || true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment