Kaynağa Gözat

install packer for sage, call packer from proper location

cobbzilla/introduce_packer
Jonathan Cobb 4 yıl önce
ebeveyn
işleme
25f7838ce1
2 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. +2
    -1
      bubble-server/src/main/java/bubble/service/packer/PackerJob.java
  2. +4
    -0
      bubble-server/src/main/resources/packer/roles/bubble/tasks/main.yml

+ 2
- 1
bubble-server/src/main/java/bubble/service/packer/PackerJob.java Dosyayı Görüntüle

@@ -62,6 +62,7 @@ public class PackerJob implements Callable<List<PackerImage>> {
public static final String BUILDERS_VAR = "builders";
public static final String PACKER_PLAYBOOK_TEMPLATE = "packer-playbook.yml.hbs";
public static final String PACKER_PLAYBOOK = "packer-playbook.yml";
public static final String PACKER_BINARY = System.getProperty("user.home")+"/packer/packer";

@Autowired private BubbleConfiguration configuration;
@Autowired private AccountDAO accountDAO;
@@ -211,7 +212,7 @@ public class PackerJob implements Callable<List<PackerImage>> {

// run packer, return handle to running packer
log.info("running packer for " + installType + "...");
final CommandResult commandResult = CommandShell.exec(new Command(new CommandLine("packer")
final CommandResult commandResult = CommandShell.exec(new Command(new CommandLine(PACKER_BINARY)
.addArgument("build")
.addArgument("-parallel-builds=2")
.addArgument("-color=false")


+ 4
- 0
bubble-server/src/main/resources/packer/roles/bubble/tasks/main.yml Dosyayı Görüntüle

@@ -111,3 +111,7 @@
copy:
src: supervisor_refresh_bubble_ssh_keys_monitor.conf
dest: /etc/supervisor/conf.d/refresh_bubble_ssh_keys_monitor.conf

- name: Install packer for sage node
shell: su - bubble bash -c install_packer.sh
when: install_type == 'sage'

Yükleniyor…
İptal
Kaydet